From 792ea008af17238d2af91301241973dc4f4f544c Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Sun, 16 Jun 2019 21:25:52 +0200 Subject: Move md5_asm_src file information to build.info files Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/9166) --- Configurations/00-base-templates.conf | 4 ---- Configurations/README | 2 -- Configure | 4 ---- crypto/md5/build.info | 19 +++++++++++++++++-- 4 files changed, 17 insertions(+), 12 deletions(-) diff --git a/Configurations/00-base-templates.conf b/Configurations/00-base-templates.conf index b4eb7e9419..2eb757534b 100644 --- a/Configurations/00-base-templates.conf +++ b/Configurations/00-base-templates.conf @@ -14,7 +14,6 @@ my %targets=( thread_scheme => "(unknown)", # Assume we don't know thread_defines => [], - md5_asm_src => "", cast_asm_src => "c_enc.c", rc4_asm_src => "rc4_enc.c rc4_skey.c", rmd160_asm_src => "", @@ -162,7 +161,6 @@ my %targets=( x86_asm => { template => 1, - md5_asm_src => "md5-586.s", cast_asm_src => "cast-586.s", sha1_asm_src => "sha1-586.s sha256-586.s sha512-586.s", rc4_asm_src => "rc4-586.s", @@ -181,7 +179,6 @@ my %targets=( }, x86_64_asm => { template => 1, - md5_asm_src => "md5-x86_64.s", sha1_asm_src => "sha1-x86_64.s sha256-x86_64.s sha512-x86_64.s sha1-mb-x86_64.s sha256-mb-x86_64.s", rc4_asm_src => "rc4-x86_64.s rc4-md5-x86_64.s", wp_asm_src => "wp-x86_64.s", @@ -201,7 +198,6 @@ my %targets=( }, sparcv9_asm => { template => 1, - md5_asm_src => "md5-sparcv9.S", sha1_asm_src => "sha1-sparcv9.S sha256-sparcv9.S sha512-sparcv9.S", cmll_asm_src => "camellia.c cmll_misc.c cmll_cbc.c cmllt4-sparcv9.S", modes_asm_src => "ghash-sparcv9.S", diff --git a/Configurations/README b/Configurations/README index e8be7ffd7f..f8d52cad9e 100644 --- a/Configurations/README +++ b/Configurations/README @@ -240,8 +240,6 @@ In each table entry, the following keys are significant: export vars as accessor functions. - md5_asm_src => Assembler implementation of core MD5 - functions. sha1_asm_src => Assembler implementation of core SHA1, functions, and also possibly SHA256 and SHA512 ones. diff --git a/Configure b/Configure index 68f642ff62..7ff3b69350 100755 --- a/Configure +++ b/Configure @@ -1415,9 +1415,6 @@ unless ($disabled{asm}) { if ($target{rc4_asm_src} ne $table{DEFAULTS}->{rc4_asm_src}) { push @{$config{lib_defines}}, "RC4_ASM"; } - if ($target{md5_asm_src}) { - push @{$config{lib_defines}}, "MD5_ASM"; - } $target{cast_asm_src}=$table{DEFAULTS}->{cast_asm_src} unless $disabled{pic}; # CAST assembler is not PIC if ($target{rmd160_asm_src}) { push @{$config{lib_defines}}, "RMD160_ASM"; @@ -3366,7 +3363,6 @@ sub print_table_entry "loutflag", "ex_libs", "bn_ops", - "md5_asm_src", "cast_asm_src", "sha1_asm_src", "rc4_asm_src", diff --git a/crypto/md5/build.info b/crypto/md5/build.info index 2b1444dc68..3b91abf332 100644 --- a/crypto/md5/build.info +++ b/crypto/md5/build.info @@ -1,6 +1,21 @@ LIBS=../../libcrypto -SOURCE[../../libcrypto]=\ - md5_dgst.c md5_one.c md5_sha1.c {- $target{md5_asm_src} -} + +$MD5ASM= +IF[{- !$disabled{asm} -}] + $MD5ASM_x86=md5-586.s + $MD5ASM_x86_64=md5-x86_64.s + $MD5ASM_sparcv9=md5-sparcv9.S + + # Now that we have defined all the arch specific variables, use the + # appropriate one, and define the appropriate macros + IF[$MD5ASM_{- $target{asm_arch} -}] + $MD5ASM=$MD5ASM_{- $target{asm_arch} -} + $MD5DEF=MD5_ASM + ENDIF +ENDIF + +SOURCE[../../libcrypto]=md5_dgst.c md5_one.c md5_sha1.c $MD5ASM +DEFINE[../../libcrypto]=$MD5DEF GENERATE[md5-586.s]=asm/md5-586.pl \ $(PERLASM_SCHEME) $(LIB_CFLAGS) $(LIB_CPPFLAGS) -- cgit v1.2.3