Move rmd160_asm_src file information to build.info files
authorRichard Levitte <levitte@openssl.org>
Sun, 16 Jun 2019 19:54:35 +0000 (21:54 +0200)
committerRichard Levitte <levitte@openssl.org>
Mon, 17 Jun 2019 14:08:52 +0000 (16:08 +0200)
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/9166)

Configurations/00-base-templates.conf
Configurations/README
Configure
crypto/ripemd/build.info

index 337ee223dbacc040812f229c1db0ee64a06d93eb..6e6e14ea1041bbb0b18f197c25ea5a417ab9a36c 100644 (file)
@@ -14,7 +14,6 @@ my %targets=(
        thread_scheme   => "(unknown)", # Assume we don't know
        thread_defines  => [],
 
-       rmd160_asm_src  => "",
        rc5_asm_src     => "rc5_enc.c",
        wp_asm_src      => "wp_block.c",
        cmll_asm_src    => "camellia.c cmll_misc.c cmll_cbc.c",
@@ -159,7 +158,6 @@ my %targets=(
 
     x86_asm => {
        template        => 1,
-       rmd160_asm_src  => "rmd-586.s",
        rc5_asm_src     => "rc5-586.s",
        wp_asm_src      => "wp_block.c wp-mmx.s",
        cmll_asm_src    => "cmll-x86.s",
index b19e852ec541dee345d5c62be7f9443a85cc94e7..6c4066358dd0b300c7359535e4c5504c1346dd92 100644 (file)
@@ -240,8 +240,6 @@ In each table entry, the following keys are significant:
                                                 export vars as
                                                 accessor functions.
 
-        rmd160_asm_src  => Assembler implementation of core RMD160
-                           functions.
         rc5_asm_src     => Assembler implementation of core RC5
                            functions.
                            Defaults to 'rc5_enc.c'
index ef80f0f486d7f203bd89a277d4ea18d0e5ac1062..e091d3f050b94541e43fb0afa94b340fcca7be7b 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -1407,9 +1407,6 @@ unless ($disabled{asm}) {
     if ($target{keccak1600_asm_src} ne $table{DEFAULTS}->{keccak1600_asm_src}) {
         push @{$config{lib_defines}}, "KECCAK1600_ASM";
     }
-    if ($target{rmd160_asm_src}) {
-        push @{$config{lib_defines}}, "RMD160_ASM";
-    }
     if ($target{wp_asm_src} =~ /mmx/) {
         if ($config{processor} eq "386") {
             $target{wp_asm_src}=$table{DEFAULTS}->{wp_asm_src};
@@ -3354,7 +3351,6 @@ sub print_table_entry
         "loutflag",
         "ex_libs",
         "bn_ops",
-        "rmd160_asm_src",
         "rc5_asm_src",
         "wp_asm_src",
         "cmll_asm_src",
index a4a894e2d1f9ed7a78b8bba217babb441619dc32..e2db293228ec8da7d25f57b49bed7967e753812a 100644 (file)
@@ -1,6 +1,19 @@
 LIBS=../../libcrypto
-SOURCE[../../libcrypto]=\
-        rmd_dgst.c rmd_one.c {- $target{rmd160_asm_src} -}
+
+$RMD160ASM=
+IF[{- !$disabled{asm} -}]
+  $RMD160ASM_x86=rmd-586.s
+
+  # Now that we have defined all the arch specific variables, use the
+  # appropriate one, and define the appropriate macros
+  IF[$RMD160ASM_{- $target{asm_arch} -}]
+    $RMD160ASM=$RMD160ASM_{- $target{asm_arch} -}
+    $RMD160DEF=RMD160_ASM
+  ENDIF
+ENDIF
+
+SOURCE[../../libcrypto]=rmd_dgst.c rmd_one.c $RMD160ASM
+DEFINE[../../libcrypto]=$RMD160DEF
 
 GENERATE[rmd-586.s]=asm/rmd-586.pl \
         $(PERLASM_SCHEME) $(LIB_CFLAGS) $(LIB_CPPFLAGS)