diff options
| author | christos <christos@NetBSD.org> | 2021-04-26 18:06:09 +0000 |
|---|---|---|
| committer | christos <christos@NetBSD.org> | 2021-04-26 18:06:09 +0000 |
| commit | 8add67b04d0dd2f9bcf335c51daeb63bad79569e (patch) | |
| tree | de919646ed929a96e875d1c88955db66722fc310 | |
| parent | aedfa9edd1b455e8e3da1b621b2068340f1650d3 (diff) | |
Centralize the logic for endian and 64 bit availability.
6 files changed, 37 insertions, 12 deletions
diff --git a/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/aes.inc b/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/aes.inc index 6a3c98b8cd2..b47947c9d49 100644 --- a/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/aes.inc +++ b/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/aes.inc @@ -1,7 +1,8 @@ -.if empty(MACHINE_ARCH:M*eb) +.include "mips.inc" +.if ${MIPS_LE} .PATH.S: ${.PARSEDIR} -#AES_SRCS = aes-mips${"${COPTS:M*-mabi=64*}" == "":?:64}.S +#AES_SRCS = aes-mips${MIPS_64}.S #AESCPPFLAGS = -DAES_ASM .endif diff --git a/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/bn.inc b/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/bn.inc index 87170357686..0a2e14994b8 100644 --- a/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/bn.inc +++ b/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/bn.inc @@ -1,7 +1,9 @@ -.if empty(MACHINE_ARCH:M*eb) +.include "mips.inc" + +.if ${MIPS_LE} .PATH.S: ${.PARSEDIR} -BN_SRCS = mips${"${COPTS:M*-mabi=64*}" == "":?:64}.S +BN_SRCS = mips${MIPS_64}.S .endif .include "../../bn.inc" diff --git a/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/crypto.inc b/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/crypto.inc index b30028c8318..1dfb181bbae 100644 --- a/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/crypto.inc +++ b/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/crypto.inc @@ -1,7 +1,9 @@ -.if empty(MACHINE_ARCH:M*eb) +.include "mips.inc" + +.if ${MIPS_LE} .PATH.S: ${.PARSEDIR} -CRYPTO_SRCS += mips-mont${"${COPTS:M*-mabi=64*}" == "":?:64}.S +CRYPTO_SRCS += mips-mont${MIPS_64}.S .endif .include "../../crypto.inc" diff --git a/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/mips.inc b/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/mips.inc new file mode 100644 index 00000000000..eac22e17f44 --- /dev/null +++ b/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/mips.inc @@ -0,0 +1,17 @@ +# $NetBSD: mips.inc,v 1.1 2021/04/26 18:06:09 christos Exp $ + +.ifndef MIPS_LE + +. if empty(MACHINE_ARCH:M*el) +MIPS_LE=0 +. else +MIPS_LE=1 +. endif + +. if empty(MACHINE_ARCH:Mmips*64*) +MIPS_64= +. else +MIPS_64=64 +. endif + +.endif diff --git a/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/poly1305.inc b/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/poly1305.inc index 89f9a3d46ea..3aea5bc4f0a 100644 --- a/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/poly1305.inc +++ b/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/poly1305.inc @@ -1,5 +1,6 @@ -.if empty(MACHINE_ARCH:M*eb) -.if !empty(MACHINE_ARCH:Mmips64*) +.include "mips.inc" + +.if ${MIPS_LE} && ${MIPS_64} == "64" .PATH.S: ${.PARSEDIR} @@ -7,6 +8,5 @@ POLY1305_SRCS = poly1305-mips64.S POLY1305_CPPFLAGS+=-DPOLY1305_ASM .endif -.endif .include "../../poly1305.inc" diff --git a/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/sha.inc b/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/sha.inc index 7bf100bc741..b0360a41116 100644 --- a/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/sha.inc +++ b/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/sha.inc @@ -1,9 +1,12 @@ -.if empty(MACHINE_ARCH:M*eb) +.include "mips.inc" + +.if ${MIPS_LE} .PATH.S: ${.PARSEDIR} -SHA_SRCS += sha1-mips${"${COPTS:M*-mabi=64*}" == "":?:64}.S -SHA_SRCS += sha512-mips${"${COPTS:M*-mabi=64*}" == "":?:64}.S +SHA_SRCS += sha1-mips${MIPS_64}.S +SHA_SRCS += sha512-mips${MIPS_64}.S SHACPPFLAGS = -DSHA1_ASM .endif + .include "../../sha.inc" |
