Skip to content

Commit

Permalink
Move keccak1600_asm_src file information to build.info files
Browse files Browse the repository at this point in the history
Reviewed-by: Matt Caswell <[email protected]>
(Merged from openssl#9166)
  • Loading branch information
levitte committed Jun 17, 2019
1 parent 246b506 commit 8c0098a
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 13 deletions.
6 changes: 0 additions & 6 deletions Configurations/00-base-templates.conf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ my %targets=(
thread_defines => [],

padlock_asm_src => "",
keccak1600_asm_src => "keccak1600.c",

unistd => "<unistd.h>",
shared_target => "",
Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -207,6 +202,5 @@ my %targets=(
ppc64_asm => {
inherit_from => [ "ppc32_asm" ],
template => 1,
keccak1600_asm_src => "keccak1600-ppc64.s",
},
);
3 changes: 0 additions & 3 deletions Configure
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}
Expand Down
27 changes: 23 additions & 4 deletions crypto/sha/build.info
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 8c0098a

Please sign in to comment.