summaryrefslogtreecommitdiffstats
path: root/Configure
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2019-06-11 13:49:43 +0100
committerMatt Caswell <matt@openssl.org>2019-06-12 09:16:43 +0100
commita8140a42f5ee9e4e1423b5b6b319dc4657659f6f (patch)
treec38dd7dcd24d47a528737c5a223a4c86b56e7b0c /Configure
parent444ab3abb1ff4b28189e7b15dadcebb2e3564fdf (diff)
Ensure code is compiled with correct BIGNUM assembler defines
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/9130)
Diffstat (limited to 'Configure')
-rwxr-xr-xConfigure30
1 files changed, 24 insertions, 6 deletions
diff --git a/Configure b/Configure
index 17de50e689..e3c28f98b9 100755
--- a/Configure
+++ b/Configure
@@ -1407,13 +1407,31 @@ unless ($disabled{asm}) {
$target{bn_asm_src} =~ s/\w+-gf2m.c// if (defined($disabled{ec2m}));
# bn-586 is the only one implementing bn_*_part_words
- push @{$config{lib_defines}}, "OPENSSL_BN_ASM_PART_WORDS" if ($target{bn_asm_src} =~ /bn-586/);
- push @{$config{lib_defines}}, "OPENSSL_IA32_SSE2" if (!$disabled{sse2} && $target{bn_asm_src} =~ /86/);
+ if ($target{bn_asm_src} =~ /bn-586/) {
+ push @{$config{lib_defines}}, "OPENSSL_BN_ASM_PART_WORDS";
+ push @{$config{module_defines}}, "OPENSSL_BN_ASM_PART_WORDS";
+ }
+ if (!$disabled{sse2} && $target{bn_asm_src} =~ /86/) {
+ push @{$config{lib_defines}}, "OPENSSL_IA32_SSE2";
+ push @{$config{module_defines}}, "OPENSSL_IA32_SSE2";
+ }
- push @{$config{lib_defines}}, "OPENSSL_BN_ASM_MONT" if ($target{bn_asm_src} =~ /-mont/);
- push @{$config{lib_defines}}, "OPENSSL_BN_ASM_MONT5" if ($target{bn_asm_src} =~ /-mont5/);
- push @{$config{lib_defines}}, "OPENSSL_BN_ASM_GF2m" if ($target{bn_asm_src} =~ /-gf2m/);
- push @{$config{lib_defines}}, "BN_DIV3W" if ($target{bn_asm_src} =~ /-div3w/);
+ if ($target{bn_asm_src} =~ /-mont/) {
+ push @{$config{lib_defines}}, "OPENSSL_BN_ASM_MONT";
+ push @{$config{module_defines}}, "OPENSSL_BN_ASM_MONT";
+ }
+ if ($target{bn_asm_src} =~ /-mont5/) {
+ push @{$config{lib_defines}}, "OPENSSL_BN_ASM_MONT5";
+ push @{$config{module_defines}}, "OPENSSL_BN_ASM_MONT5";
+ }
+ if ($target{bn_asm_src} =~ /-gf2m/) {
+ push @{$config{lib_defines}}, "OPENSSL_BN_ASM_GF2m";
+ push @{$config{module_defines}}, "OPENSSL_BN_ASM_GF2m";
+ }
+ if ($target{bn_asm_src} =~ /-div3w/) {
+ push @{$config{lib_defines}}, "BN_DIV3W";
+ push @{$config{module_defines}}, "BN_DIV3W";
+ }
if ($target{sha1_asm_src}) {
push @{$config{lib_defines}}, "SHA1_ASM" if ($target{sha1_asm_src} =~ /sx86/ || $target{sha1_asm_src} =~ /sha1/);