summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2019-06-16 22:34:09 +0200
committerRichard Levitte <levitte@openssl.org>2019-06-17 16:08:53 +0200
commit8c0098a8de9ad858f575a3aab3b94b1ada773b28 (patch)
tree03414173bb837dd10f64ed218335dc9e2047909d
parent246b50605ff4c278c91c22b84bb7ed3f4bd677ec (diff)
Move keccak1600_asm_src file information to build.info files
Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9166)
-rw-r--r--Configurations/00-base-templates.conf6
-rwxr-xr-xConfigure3
-rw-r--r--crypto/sha/build.info27
3 files changed, 23 insertions, 13 deletions
diff --git a/Configurations/00-base-templates.conf b/Configurations/00-base-templates.conf
index edc176241e..14b7608ca5 100644
--- a/Configurations/00-base-templates.conf
+++ b/Configurations/00-base-templates.conf
@@ -15,7 +15,6 @@ my %targets=(
thread_defines => [],
padlock_asm_src => "",
- keccak1600_asm_src => "keccak1600.c",
unistd => "<unistd.h>",
shared_target => "",
@@ -161,7 +160,6 @@ my %targets=(
x86_64_asm => {
template => 1,
padlock_asm_src => "e_padlock-x86_64.s",
- keccak1600_asm_src => "keccak1600-x86_64.s",
},
ia64_asm => {
template => 1,
@@ -184,15 +182,12 @@ my %targets=(
},
s390x_asm => {
template => 1,
- keccak1600_asm_src => "keccak1600-s390x.S",
},
armv4_asm => {
template => 1,
- keccak1600_asm_src => "keccak1600-armv4.S",
},
aarch64_asm => {
template => 1,
- keccak1600_asm_src => "keccak1600-armv8.S",
},
parisc11_asm => {
template => 1,
@@ -207,6 +202,5 @@ my %targets=(
ppc64_asm => {
inherit_from => [ "ppc32_asm" ],
template => 1,
- keccak1600_asm_src => "keccak1600-ppc64.s",
},
);
diff --git a/Configure b/Configure
index 7ec44a3c2b..dd8c595b65 100755
--- a/Configure
+++ b/Configure
@@ -1404,9 +1404,6 @@ if ($target{sys_id} ne "")
}
unless ($disabled{asm}) {
- if ($target{keccak1600_asm_src} ne $table{DEFAULTS}->{keccak1600_asm_src}) {
- push @{$config{lib_defines}}, "KECCAK1600_ASM";
- }
if ($target{padlock_asm_src} ne $table{DEFAULTS}->{padlock_asm_src}) {
push @{$config{dso_defines}}, "PADLOCK_ASM";
}
diff --git a/crypto/sha/build.info b/crypto/sha/build.info
index c9ade6e522..187d0c495a 100644
--- a/crypto/sha/build.info
+++ b/crypto/sha/build.info
@@ -53,12 +53,31 @@ IF[{- !$disabled{asm} -}]
ENDIF
ENDIF
-$COMMON=sha1dgst.c sha256.c sha512.c sha3.c $SHA1ASM \
- {- $target{keccak1600_asm_src} -}
+$KECCAK1600ASM=keccak1600.c
+IF[{- !$disabled{asm} -}]
+ $KECCAK1600ASM_x86=
+ $KECCAK1600ASM_x86_64=keccak1600-x86_64.s
+
+ $KECCAK1600ASM_s390x=keccak1600-s390x.S
+
+ $KECCAK1600ASM_armv4=keccak1600-armv4.S
+ $KECCAK1600ASM_aarch64=keccak1600-armv8.S
+
+ $KECCAK1600ASM_ppc64=keccak1600-ppc64.s
+
+ # Now that we have defined all the arch specific variables, use the
+ # appropriate one, and define the appropriate macros
+ IF[$KECCAK1600ASM_{- $target{asm_arch} -}]
+ $KECCAK1600ASM=$KECCAK1600ASM_{- $target{asm_arch} -}
+ $KECCAK1600DEF=KECCAK1600_ASM
+ ENDIF
+ENDIF
+
+$COMMON=sha1dgst.c sha256.c sha512.c sha3.c $SHA1ASM $KECCAK1600ASM
SOURCE[../../libcrypto]=$COMMON sha1_one.c
-DEFINE[../../libcrypto]=$SHA1DEF
+DEFINE[../../libcrypto]=$SHA1DEF $KECCAK1600DEF
SOURCE[../../providers/fips]= $COMMON
-DEFINE[../../providers/fips]= $SHA1DEF
+DEFINE[../../providers/fips]= $SHA1DEF $KECCAK1600DEF
GENERATE[sha1-586.s]=asm/sha1-586.pl \
$(PERLASM_SCHEME) $(LIB_CFLAGS) $(LIB_CPPFLAGS) $(PROCESSOR)