summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2020-04-15 12:54:23 +0200
committerRichard Levitte <levitte@openssl.org>2021-04-02 16:39:13 +0200
commit5ad3e6c56eb1c295a7de92de5bb2f54614d5c277 (patch)
tree7f52a2514e6eb6f9ab7f15597f208d32e3bafa1e
parentef83daf4dadf9380a3b94618fb7aee75fcd9a6b1 (diff)
Include BN assembler alongside CPUID code
It turns out that some CPUID code requires the presence of some BN assembler code, so we make sure it's included in the same manner as the CPUID code itself. Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14755)
-rw-r--r--crypto/bn/build.info10
-rw-r--r--crypto/build.info5
2 files changed, 9 insertions, 6 deletions
diff --git a/crypto/bn/build.info b/crypto/bn/build.info
index 237d5e90ed..89ff0044f2 100644
--- a/crypto/bn/build.info
+++ b/crypto/bn/build.info
@@ -107,17 +107,21 @@ $COMMON=bn_add.c bn_div.c bn_exp.c bn_lib.c bn_ctx.c bn_mul.c \
bn_recp.c bn_mont.c bn_mpi.c bn_exp2.c bn_gf2m.c bn_nist.c \
bn_intern.c bn_dh.c bn_rsa_fips186_4.c bn_const.c
SOURCE[../../libcrypto]=$COMMON $BNASM bn_print.c bn_err.c bn_srp.c
+DEFINE[../../libcrypto]=$BNDEF
IF[{- !$disabled{'deprecated-3.0'} -}]
SOURCE[../../libcrypto]=bn_depr.c bn_x931p.c
ENDIF
SOURCE[../../providers/libfips.a]=$COMMON $BNASM
+DEFINE[../../providers/libfips.a]=$BNDEF
+# Because some CPUID implementations use some BN assembler (!!!), we
+# must include assembler code into the legacy provider under the same
+# conditions as CPUID code is included. See ../build.info
SOURCE[../../providers/liblegacy.a]=$BNASM
+DEFINE[../../providers/liblegacy.a]=$BNDEF
# Implementations are now spread across several libraries, so the defines
# need to be applied to all affected libraries and modules.
-DEFINE[../../libcrypto]=$BNDEF
-DEFINE[../../providers/libfips.a]=$BNDEF
-DEFINE[../../providers/liblegacy.a]=$BNDEF
DEFINE[../../providers/libimplementations.a]=$BNDEF
+DEFINE[../../providers/libcommon.a]=$BNDEF
INCLUDE[bn_exp.o]=..
diff --git a/crypto/build.info b/crypto/build.info
index e6dce8ebc2..560f872ee2 100644
--- a/crypto/build.info
+++ b/crypto/build.info
@@ -67,8 +67,8 @@ INCLUDE[cpuid.o]=..
SOURCE[../libcrypto]=$CPUID_COMMON
DEFINE[../libcrypto]=$CPUIDDEF
-SOURCE[../providers/fips]=$CPUID_COMMON
-DEFINE[../providers/fips]=$CPUIDDEF
+SOURCE[../providers/libfips.a]=$CPUID_COMMON
+DEFINE[../providers/libfips.a]=$CPUIDDEF
# We only need to include the CPUID stuff in the legacy provider when it's a
# separate module and it's dynamically linked with libcrypto. Otherwise, it
# already gets everything that the static libcrypto.a has, and doesn't need it
@@ -80,7 +80,6 @@ ENDIF
# Implementations are now spread across several libraries, so the CPUID define
# need to be applied to all affected libraries and modules.
-DEFINE[../providers/libfips.a]=$CPUIDDEF
DEFINE[../providers/libimplementations.a]=$CPUIDDEF
DEFINE[../providers/libcommon.a]=$CPUIDDEF