Move modes_asm_src file information to build.info files

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/9166)
This commit is contained in:
Richard Levitte 2019-06-16 22:17:26 +02:00
parent 94707b0b68
commit a9bb7e9270
5 changed files with 51 additions and 21 deletions

View file

@ -14,7 +14,6 @@ my %targets=(
thread_scheme => "(unknown)", # Assume we don't know thread_scheme => "(unknown)", # Assume we don't know
thread_defines => [], thread_defines => [],
modes_asm_src => "",
padlock_asm_src => "", padlock_asm_src => "",
chacha_asm_src => "chacha_enc.c", chacha_asm_src => "chacha_enc.c",
poly1305_asm_src => "", poly1305_asm_src => "",
@ -155,7 +154,6 @@ my %targets=(
x86_asm => { x86_asm => {
template => 1, template => 1,
modes_asm_src => "ghash-x86.s",
padlock_asm_src => "e_padlock-x86.s", padlock_asm_src => "e_padlock-x86.s",
chacha_asm_src => "chacha-x86.s", chacha_asm_src => "chacha-x86.s",
poly1305_asm_src=> "poly1305-x86.s", poly1305_asm_src=> "poly1305-x86.s",
@ -166,7 +164,6 @@ my %targets=(
}, },
x86_64_asm => { x86_64_asm => {
template => 1, template => 1,
modes_asm_src => "ghash-x86_64.s aesni-gcm-x86_64.s",
padlock_asm_src => "e_padlock-x86_64.s", padlock_asm_src => "e_padlock-x86_64.s",
chacha_asm_src => "chacha-x86_64.s", chacha_asm_src => "chacha-x86_64.s",
poly1305_asm_src=> "poly1305-x86_64.s", poly1305_asm_src=> "poly1305-x86_64.s",
@ -174,13 +171,11 @@ my %targets=(
}, },
ia64_asm => { ia64_asm => {
template => 1, template => 1,
modes_asm_src => "ghash-ia64.s",
chacha_asm_src => "chacha-ia64.S", chacha_asm_src => "chacha-ia64.S",
poly1305_asm_src=> "asm/poly1305-ia64.S", poly1305_asm_src=> "asm/poly1305-ia64.S",
}, },
sparcv9_asm => { sparcv9_asm => {
template => 1, template => 1,
modes_asm_src => "ghash-sparcv9.S",
poly1305_asm_src=> "poly1305-sparcv9.S", poly1305_asm_src=> "poly1305-sparcv9.S",
}, },
sparcv8_asm => { sparcv8_asm => {
@ -188,7 +183,6 @@ my %targets=(
}, },
alpha_asm => { alpha_asm => {
template => 1, template => 1,
modes_asm_src => "ghash-alpha.S",
}, },
mips32_asm => { mips32_asm => {
template => 1, template => 1,
@ -200,28 +194,24 @@ my %targets=(
}, },
s390x_asm => { s390x_asm => {
template => 1, template => 1,
modes_asm_src => "ghash-s390x.S",
chacha_asm_src => "chacha-s390x.S", chacha_asm_src => "chacha-s390x.S",
poly1305_asm_src=> "poly1305-s390x.S", poly1305_asm_src=> "poly1305-s390x.S",
keccak1600_asm_src => "keccak1600-s390x.S", keccak1600_asm_src => "keccak1600-s390x.S",
}, },
armv4_asm => { armv4_asm => {
template => 1, template => 1,
modes_asm_src => "ghash-armv4.S ghashv8-armx.S",
chacha_asm_src => "chacha-armv4.S", chacha_asm_src => "chacha-armv4.S",
poly1305_asm_src=> "poly1305-armv4.S", poly1305_asm_src=> "poly1305-armv4.S",
keccak1600_asm_src => "keccak1600-armv4.S", keccak1600_asm_src => "keccak1600-armv4.S",
}, },
aarch64_asm => { aarch64_asm => {
template => 1, template => 1,
modes_asm_src => "ghashv8-armx.S",
chacha_asm_src => "chacha-armv8.S", chacha_asm_src => "chacha-armv8.S",
poly1305_asm_src=> "poly1305-armv8.S", poly1305_asm_src=> "poly1305-armv8.S",
keccak1600_asm_src => "keccak1600-armv8.S", keccak1600_asm_src => "keccak1600-armv8.S",
}, },
parisc11_asm => { parisc11_asm => {
template => 1, template => 1,
modes_asm_src => "ghash-parisc.s",
}, },
parisc20_64_asm => { parisc20_64_asm => {
template => 1, template => 1,
@ -229,7 +219,6 @@ my %targets=(
}, },
ppc32_asm => { ppc32_asm => {
template => 1, template => 1,
modes_asm_src => "ghashp8-ppc.s",
chacha_asm_src => "chacha-ppc.s", chacha_asm_src => "chacha-ppc.s",
poly1305_asm_src=> "poly1305-ppc.s poly1305-ppcfp.s", poly1305_asm_src=> "poly1305-ppc.s poly1305-ppcfp.s",
}, },

View file

@ -949,7 +949,6 @@ my %targets = (
cppflags => combine("-DOPENSSL_SMALL_FOOTPRINT", cppflags => combine("-DOPENSSL_SMALL_FOOTPRINT",
threads("-D_REENTRANT")), threads("-D_REENTRANT")),
bn_ops => "BN_LLONG", bn_ops => "BN_LLONG",
modes_asm_src => "ghash-c64xplus.s",
chacha_asm_src => "chacha-c64xplus.s", chacha_asm_src => "chacha-c64xplus.s",
poly1305_asm_src => "poly1305-c64xplus.s", poly1305_asm_src => "poly1305-c64xplus.s",
thread_scheme => "pthreads", thread_scheme => "pthreads",
@ -1852,7 +1851,6 @@ my %targets = (
perlasm_scheme => 'ias', perlasm_scheme => 'ias',
pointer_size => "", pointer_size => "",
modes_asm_src => "", # Because ghash-ia64.s doesn't work on VMS
}, },
"vms-ia64-p32" => { "vms-ia64-p32" => {
inherit_from => [ "vms-ia64" ], inherit_from => [ "vms-ia64" ],

View file

@ -240,9 +240,6 @@ In each table entry, the following keys are significant:
export vars as export vars as
accessor functions. accessor functions.
modes_asm_src => Assembler implementation of cipher modes,
currently the functions gcm_gmult_4bit and
gcm_ghash_4bit.
padlock_asm_src => Assembler implementation of core parts of padlock_asm_src => Assembler implementation of core parts of
the padlock engine. This is mandatory on the padlock engine. This is mandatory on
any platform where the padlock engine might any platform where the padlock engine might

View file

@ -1407,9 +1407,6 @@ unless ($disabled{asm}) {
if ($target{keccak1600_asm_src} ne $table{DEFAULTS}->{keccak1600_asm_src}) { if ($target{keccak1600_asm_src} ne $table{DEFAULTS}->{keccak1600_asm_src}) {
push @{$config{lib_defines}}, "KECCAK1600_ASM"; push @{$config{lib_defines}}, "KECCAK1600_ASM";
} }
if ($target{modes_asm_src} =~ /ghash-/) {
push @{$config{lib_defines}}, "GHASH_ASM";
}
if ($target{padlock_asm_src} ne $table{DEFAULTS}->{padlock_asm_src}) { if ($target{padlock_asm_src} ne $table{DEFAULTS}->{padlock_asm_src}) {
push @{$config{dso_defines}}, "PADLOCK_ASM"; push @{$config{dso_defines}}, "PADLOCK_ASM";
} }
@ -3344,7 +3341,6 @@ sub print_table_entry
"loutflag", "loutflag",
"ex_libs", "ex_libs",
"bn_ops", "bn_ops",
"modes_asm_src",
"padlock_asm_src", "padlock_asm_src",
"chacha_asm_src", "chacha_asm_src",
"poly1035_asm_src", "poly1035_asm_src",

View file

@ -1,9 +1,59 @@
LIBS=../../libcrypto LIBS=../../libcrypto
$COMMON=cbc128.c ctr128.c cfb128.c ofb128.c {- $target{modes_asm_src} -} $MODESASM=
IF[{- !$disabled{asm} -}]
$MODESASM_x86=ghash-x86.s
$MODESDEF_x86=GHASH_ASM
$MODESASM_x86_64=ghash-x86_64.s aesni-gcm-x86_64.s
$MODESDEF_x86_64=GHASH_ASM
# ghash-ia64.s doesn't work on VMS
IF[{- $config{target} !~ /^vms-/ -}]
$MODESASM_ia64=ghash-ia64.s
$MODESDEF_ia64=GHASH_ASM
ENDIF
$MODESASM_sparcv9=ghash-sparcv9.S
$MODESDEF_sparcv9=GHASH_ASM
$MODESASM_alpha=ghash-alpha.S
$MODESDEF_alpha=GHASH_ASM
$MODESASM_s390x=ghash-s390x.S
$MODESDEF_s390x=GHASH_ASM
$MODESASM_armv4=ghash-armv4.S ghashv8-armx.S
$MODESDEF_armv4=GHASH_ASM
$MODESASM_aarch64=ghashv8-armx.S
$MODESDEF_aarch64=GHASH_ASM
$MODESASM_parisc11=ghash-parisc.s
$MODESDEF_parisc11=GHASH_ASM
$MODESASM_parisc20_64=$MODESASM_parisc11
$MODESDEF_parisc20_64=$MODESDEF_parisc11
$MODESASM_ppc32=ghashp8-ppc.s
$MODESDEF_ppc32=
$MODESASM_ppc64=$MODESASM_ppc32
$MODESDEF_ppc64=$MODESDEF_ppc32
$MODESASM_c64xplus=ghash-c64xplus.s
$MODESDEF_c64xplus=GHASH_ASM
# Now that we have defined all the arch specific variables, use the
# appropriate one, and define the appropriate macros
IF[$MODESASM_{- $target{asm_arch} -}]
$MODESASM=$MODESASM_{- $target{asm_arch} -}
$MODESDEF=$MODESDEF_{- $target{asm_arch} -}
ENDIF
ENDIF
$COMMON=cbc128.c ctr128.c cfb128.c ofb128.c $MODESASM
SOURCE[../../libcrypto]=$COMMON \ SOURCE[../../libcrypto]=$COMMON \
cts128.c gcm128.c ccm128.c xts128.c wrap128.c ocb128.c siv128.c cts128.c gcm128.c ccm128.c xts128.c wrap128.c ocb128.c siv128.c
DEFINE[../../libcrypto]=$MODESDEF
SOURCE[../../providers/fips]=$COMMON SOURCE[../../providers/fips]=$COMMON
DEFINE[../../providers/fips]=$MODESDEF
INCLUDE[gcm128.o]=.. INCLUDE[gcm128.o]=..