Move bf_asm_src file information to build.info files
authorRichard Levitte <levitte@openssl.org>
Sun, 16 Jun 2019 19:20:43 +0000 (21:20 +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/bf/build.info

index 0c7334e..b4eb7e9 100644 (file)
@@ -14,7 +14,6 @@ my %targets=(
        thread_scheme   => "(unknown)", # Assume we don't know
        thread_defines  => [],
 
-       bf_asm_src      => "bf_enc.c",
        md5_asm_src     => "",
        cast_asm_src    => "c_enc.c",
        rc4_asm_src     => "rc4_enc.c rc4_skey.c",
@@ -163,7 +162,6 @@ my %targets=(
 
     x86_asm => {
        template        => 1,
-       bf_asm_src      => "bf-586.s",
        md5_asm_src     => "md5-586.s",
        cast_asm_src    => "cast-586.s",
        sha1_asm_src    => "sha1-586.s sha256-586.s sha512-586.s",
index 36e71ee..e8be7ff 100644 (file)
@@ -240,9 +240,6 @@ In each table entry, the following keys are significant:
                                                 export vars as
                                                 accessor functions.
 
-        bf_asm_src      => Assembler implementation of core BlowFish
-                           functions.
-                           Defaults to 'bf_enc.c'
         md5_asm_src     => Assembler implementation of core MD5
                            functions.
         sha1_asm_src    => Assembler implementation of core SHA1,
index cbd8ef1..68f642f 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -3366,7 +3366,6 @@ sub print_table_entry
         "loutflag",
         "ex_libs",
         "bn_ops",
-        "bf_asm_src",
         "md5_asm_src",
         "cast_asm_src",
         "sha1_asm_src",
index 29adc8c..cc06212 100644 (file)
@@ -1,6 +1,17 @@
 LIBS=../../libcrypto
-SOURCE[../../libcrypto]=bf_skey.c bf_ecb.c bf_cfb64.c bf_ofb64.c \
-        {- $target{bf_asm_src} -}
+
+$BFASM=bf_enc.c
+IF[{- !$disabled{asm} -}]
+  $BFASM_x86=bf-586.s
+
+  # Now that we have defined all the arch specific variables, use the
+  # appropriate one
+  IF[$BFASM_{- $target{asm_arch} -}]
+    $BFASM=$BFASM_{- $target{asm_arch} -}
+  ENDIF
+ENDIF
+
+SOURCE[../../libcrypto]=bf_skey.c bf_ecb.c bf_cfb64.c bf_ofb64.c $BFASM
 
 GENERATE[bf-586.s]=asm/bf-586.pl \
         $(PERLASM_SCHEME) $(LIB_CFLAGS) $(LIB_CPPFLAGS) $(PROCESSOR)