diff --git a/crypto/external/bsd/openssl/include/crypto/bn_conf.h b/crypto/external/bsd/openssl/include/crypto/bn_conf.h index b290e5092a8f..ee3d68482acb 100644 --- a/crypto/external/bsd/openssl/include/crypto/bn_conf.h +++ b/crypto/external/bsd/openssl/include/crypto/bn_conf.h @@ -22,12 +22,15 @@ /* Should we define BN_DIV2W here? */ /* Only one for the following should be defined */ -#ifdef _LP64 +#if defined(_LP64) && !defined(__sparc64__) /* sparc64 asm needs 32bit BN limbs */ #define SIXTY_FOUR_BIT_LONG #elif _ILP64 #define SIXTY_FOUR_BIT #else #define THIRTY_TWO_BIT #endif +#ifdef __sparc64__ +#define BN_LLONG +#endif #endif diff --git a/crypto/external/bsd/openssl/include/openssl/configuration.h b/crypto/external/bsd/openssl/include/openssl/configuration.h index e11d4992f3a7..6adffa0b9572 100644 --- a/crypto/external/bsd/openssl/include/openssl/configuration.h +++ b/crypto/external/bsd/openssl/include/openssl/configuration.h @@ -120,7 +120,7 @@ extern "C" { # undef BN_LLONG /* Only one for the following should be defined */ # undef SIXTY_FOUR_BIT -# ifdef __LP64__ +# if defined(__LP64__) && !defined(__sparc64__) /* sparc64 asm needs 32bit BN limbs */ # define SIXTY_FOUR_BIT_LONG # undef THIRTY_TWO_BIT # else @@ -128,6 +128,9 @@ extern "C" { # define THIRTY_TWO_BIT # endif # endif +#ifdef __sparc64__ +# define BN_LLONG +#endif # define RC4_INT unsigned int diff --git a/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc64/crypto.inc b/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc64/crypto.inc index 4eef0501d5e4..871857e3d022 100644 --- a/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc64/crypto.inc +++ b/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc64/crypto.inc @@ -2,6 +2,9 @@ CPUID_SRCS = sparcv9cap.c sparccpuid.S sparcv9-mont.S sparcv9a-mont.S CPUID_SRCS += sparct4-mont.S vis3-mont.S CPUID = yes -#CPPFLAGS += -DOPENSSL_BN_ASM_MONT + +CPPFLAGS += -DOPENSSL_BN_ASM_MONT +CPUID_SRCS+=bn_sparc.c + CPPFLAGS += -DOPENSSL_CPUID_OBJ .include "../../crypto.inc" diff --git a/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc64/ec.inc b/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc64/ec.inc index 4d6ae74376db..44eec06730ab 100644 --- a/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc64/ec.inc +++ b/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc64/ec.inc @@ -2,6 +2,7 @@ EC_SRCS += \ ecp_nistz256-sparcv9.S ECCPPFLAGS+= -DECP_NISTZ256_ASM - +ECCPPFLAGS+= -DOPENSSL_NO_EC_NISTP_64_GCC_128 ECNI = yes +COPTS.bn_exp.c+=-Wno-error=stack-protector .include "../../ec.inc" diff --git a/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc64/sha.inc b/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc64/sha.inc index 64732c3d9836..a36fb76a9ee1 100644 --- a/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc64/sha.inc +++ b/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc64/sha.inc @@ -1,4 +1,4 @@ .PATH.S: ${.PARSEDIR} -SHA_SRCS = sha1-sparcv9.S -SHACPPFLAGS = -DSHA1_ASM +SHA_SRCS = sha1-sparcv9.S sha256-sparcv9.S sha512-sparcv9.S +SHACPPFLAGS = -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM .include "../../sha.inc"