thread_defines => [],
padlock_asm_src => "",
- keccak1600_asm_src => "keccak1600.c",
unistd => "<unistd.h>",
shared_target => "",
x86_64_asm => {
template => 1,
padlock_asm_src => "e_padlock-x86_64.s",
- keccak1600_asm_src => "keccak1600-x86_64.s",
},
ia64_asm => {
template => 1,
},
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,
ppc64_asm => {
inherit_from => [ "ppc32_asm" ],
template => 1,
- keccak1600_asm_src => "keccak1600-ppc64.s",
},
);
}
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";
}
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)