Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-9]: src/crypto/external/bsd/openssl/lib/libcrypto/arch Pull up fo...



details:   https://anonhg.NetBSD.org/src/rev/b72db1a54cac
branches:  netbsd-9
changeset: 1002352:b72db1a54cac
user:      martin <martin%NetBSD.org@localhost>
date:      Sun Aug 15 08:58:55 2021 +0000

description:
Pull up following revision(s) (requested by tsutsui in ticket #1336):

        crypto/external/bsd/openssl/lib/libcrypto/arch/mips/mips.inc: revision 1.1
        crypto/external/bsd/openssl/lib/libcrypto/arch/mips/mips.inc: revision 1.2
        crypto/external/bsd/openssl/lib/libcrypto/arch/mips/bn.inc: revision 1.7
        crypto/external/bsd/openssl/lib/libcrypto/arch/mips/poly1305.inc: revision 1.5
        crypto/external/bsd/openssl/lib/libcrypto/arch/mips/bn.inc: revision 1.8
        crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/bn.inc: revision 1.3
        crypto/external/bsd/openssl/lib/libcrypto/arch/mips/crypto.inc: revision 1.8
        crypto/external/bsd/openssl/lib/libcrypto/arch/mips/aes.inc: revision 1.6
        crypto/external/bsd/openssl/lib/libcrypto/arch/mips/sha.inc: revision 1.7

Centralize the logic for endian and 64 bit availability.

Handle the compat builds and both the n64 and non n64 variants

PR/56318: Izumi Tsutsui: Limit bn-sparcv8.S to sparc64; breaks
on sparcstation 2 (sun4c)

PR/56318: Izumi Tsutsui: Don't include mips.S for 32 bit mips because it
does not work for mips1

diffstat:

 crypto/external/bsd/openssl/lib/libcrypto/arch/mips/aes.inc      |   5 +-
 crypto/external/bsd/openssl/lib/libcrypto/arch/mips/bn.inc       |   7 ++-
 crypto/external/bsd/openssl/lib/libcrypto/arch/mips/crypto.inc   |   6 ++-
 crypto/external/bsd/openssl/lib/libcrypto/arch/mips/mips.inc     |  18 ++++++++++
 crypto/external/bsd/openssl/lib/libcrypto/arch/mips/poly1305.inc |   6 +-
 crypto/external/bsd/openssl/lib/libcrypto/arch/mips/sha.inc      |   9 +++-
 crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/bn.inc      |   3 +
 7 files changed, 42 insertions(+), 12 deletions(-)

diffs (117 lines):

diff -r b22b2ff2751a -r b72db1a54cac crypto/external/bsd/openssl/lib/libcrypto/arch/mips/aes.inc
--- a/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/aes.inc       Sun Aug 15 08:44:39 2021 +0000
+++ b/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/aes.inc       Sun Aug 15 08:58:55 2021 +0000
@@ -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 -r b22b2ff2751a -r b72db1a54cac crypto/external/bsd/openssl/lib/libcrypto/arch/mips/bn.inc
--- a/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/bn.inc        Sun Aug 15 08:44:39 2021 +0000
+++ b/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/bn.inc        Sun Aug 15 08:58:55 2021 +0000
@@ -1,7 +1,10 @@
-.if empty(MACHINE_ARCH:M*eb)
+.include "mips.inc"
+
+# Don't include mips.S for 32 bit mips because it does not work for mips1
+.if ${MIPS_LE} && ${MIPS_64} == "64"
 .PATH.S: ${.PARSEDIR}
 
-BN_SRCS = mips${"${COPTS:M*-mabi=64*}" == "":?:64}.S
+BN_SRCS = mips${MIPS_64}.S
 .endif
 
 .include "../../bn.inc"
diff -r b22b2ff2751a -r b72db1a54cac crypto/external/bsd/openssl/lib/libcrypto/arch/mips/crypto.inc
--- a/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/crypto.inc    Sun Aug 15 08:44:39 2021 +0000
+++ b/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/crypto.inc    Sun Aug 15 08:58:55 2021 +0000
@@ -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 -r b22b2ff2751a -r b72db1a54cac crypto/external/bsd/openssl/lib/libcrypto/arch/mips/mips.inc
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/mips.inc      Sun Aug 15 08:58:55 2021 +0000
@@ -0,0 +1,18 @@
+# $NetBSD: mips.inc,v 1.2.6.2 2021/08/15 08:58:55 martin Exp $
+
+.ifndef MIPS_LE
+
+.      if empty(MACHINE_ARCH:M*el)
+MIPS_LE=0
+.      else
+MIPS_LE=1
+.      endif
+
+.      if (!empty(MACHINE_ARCH:Mmipsn64*) && empty(COPTS:M-mabi=*32*)) || \
+          (!empty(MACHINE_ARCH:Mmips64*) && !empty(COPTS:M-mabi=*64*))
+MIPS_64=64
+.      else
+MIPS_64=
+.      endif
+
+.endif
diff -r b22b2ff2751a -r b72db1a54cac crypto/external/bsd/openssl/lib/libcrypto/arch/mips/poly1305.inc
--- a/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/poly1305.inc  Sun Aug 15 08:44:39 2021 +0000
+++ b/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/poly1305.inc  Sun Aug 15 08:58:55 2021 +0000
@@ -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_CPPFLAGS+=-DPOLY1305_ASM
 
 .endif
-.endif
 
 .include "../../poly1305.inc"
diff -r b22b2ff2751a -r b72db1a54cac crypto/external/bsd/openssl/lib/libcrypto/arch/mips/sha.inc
--- a/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/sha.inc       Sun Aug 15 08:44:39 2021 +0000
+++ b/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/sha.inc       Sun Aug 15 08:58:55 2021 +0000
@@ -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"
diff -r b22b2ff2751a -r b72db1a54cac crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/bn.inc
--- a/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/bn.inc       Sun Aug 15 08:44:39 2021 +0000
+++ b/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/bn.inc       Sun Aug 15 08:58:55 2021 +0000
@@ -1,5 +1,8 @@
 .PATH.S: ${.PARSEDIR}
+# Limit bn-sparcv8.S to sparc64; breaks on sparcstation 2 (sun4c)
+.if ${MACHINE} == "sparc64"
 # XXX bn-sparcv8plus.S doesn't work well. why?
 BN_SRCS = bn-sparcv8.S
 AFLAGS.bn-sparcv8.S+= -Wa,-Av9
+.endif
 .include "../../bn.inc"



Home | Main Index | Thread Index | Old Index