git: e951219f29ca - stable/13 - libmd: Only define SHA256_Transform_c when using the ARM64 ifunc.

From: Andrew Turner <andrew_at_FreeBSD.org>
Date: Mon, 20 Dec 2021 14:02:17 UTC
The branch stable/13 has been updated by andrew:

URL: https://cgit.FreeBSD.org/src/commit/?id=e951219f29ca4e407be59bf8ea87a7281d047270

commit e951219f29ca4e407be59bf8ea87a7281d047270
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2021-12-08 22:25:02 +0000
Commit:     Andrew Turner <andrew@FreeBSD.org>
CommitDate: 2021-12-20 11:09:26 +0000

    libmd: Only define SHA256_Transform_c when using the ARM64 ifunc.
    
    GCC 9 doesn't define a SHA256_Transform symbol when the stub just wraps
    SHA256_Transform_c resulting in an undefined symbol for
    _libmd_SHA256_Transform in libmd.so.
    
    Discussed with: andrew, jrtc27
    Reviewed by:    emaste
    Differential Revision:  https://reviews.freebsd.org/D31945
    
    (cherry picked from commit a6765c4b449d79c6ee24dd7c37deb2239f6281a4)
---
 sys/crypto/sha2/sha256c.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/sys/crypto/sha2/sha256c.c b/sys/crypto/sha2/sha256c.c
index 63805c97a4bb..57ae9e7a6ab3 100644
--- a/sys/crypto/sha2/sha256c.c
+++ b/sys/crypto/sha2/sha256c.c
@@ -138,7 +138,11 @@ static const uint32_t K[64] = {
  * the 512-bit input block to produce a new state.
  */
 static void
+#if defined(ARM64_SHA2)
 SHA256_Transform_c(uint32_t * state, const unsigned char block[64])
+#else
+SHA256_Transform(uint32_t * state, const unsigned char block[64])
+#endif
 {
 	uint32_t W[64];
 	uint32_t S[8];
@@ -213,12 +217,6 @@ DEFINE_UIFUNC(static, void, SHA256_Transform,
 
 	return (SHA256_Transform_c);
 }
-#else
-static void
-SHA256_Transform(uint32_t * state, const unsigned char block[64])
-{
-	SHA256_Transform_c(state, block);
-}
 #endif
 
 static unsigned char PAD[64] = {