Move rc4_asm_src file information to build.info files
authorRichard Levitte <levitte@openssl.org>
Sun, 16 Jun 2019 19:50:39 +0000 (21:50 +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/10-main.conf
Configurations/README
Configure
crypto/rc4/build.info

index f67fbc21cdb3c9095a939b1cd813e0c05d98cc77..337ee223dbacc040812f229c1db0ee64a06d93eb 100644 (file)
@@ -14,7 +14,6 @@ my %targets=(
        thread_scheme   => "(unknown)", # Assume we don't know
        thread_defines  => [],
 
-       rc4_asm_src     => "rc4_enc.c rc4_skey.c",
        rmd160_asm_src  => "",
        rc5_asm_src     => "rc5_enc.c",
        wp_asm_src      => "wp_block.c",
@@ -160,7 +159,6 @@ my %targets=(
 
     x86_asm => {
        template        => 1,
-       rc4_asm_src     => "rc4-586.s",
        rmd160_asm_src  => "rmd-586.s",
        rc5_asm_src     => "rc5-586.s",
        wp_asm_src      => "wp_block.c wp-mmx.s",
@@ -176,7 +174,6 @@ my %targets=(
     },
     x86_64_asm => {
        template        => 1,
-       rc4_asm_src     => "rc4-x86_64.s rc4-md5-x86_64.s",
        wp_asm_src      => "wp-x86_64.s",
        cmll_asm_src    => "cmll-x86_64.s cmll_misc.c",
        modes_asm_src   => "ghash-x86_64.s aesni-gcm-x86_64.s",
@@ -214,7 +211,6 @@ my %targets=(
     },
     s390x_asm => {
        template        => 1,
-       rc4_asm_src     => "rc4-s390x.s",
        modes_asm_src   => "ghash-s390x.S",
        chacha_asm_src  => "chacha-s390x.S",
        poly1305_asm_src=> "poly1305-s390x.S",
@@ -236,7 +232,6 @@ my %targets=(
     },
     parisc11_asm => {
        template        => 1,
-       rc4_asm_src     => "rc4-parisc.s",
        modes_asm_src   => "ghash-parisc.s",
     },
     parisc20_64_asm => {
index 9e16bcbf88c92b55c8a8dcd4ff74302e8b4ca34f..2895eef4fee6c30565127c980f3fecabdb5af1a6 100644 (file)
@@ -949,7 +949,6 @@ my %targets = (
         cppflags         => combine("-DOPENSSL_SMALL_FOOTPRINT",
                                     threads("-D_REENTRANT")),
         bn_ops           => "BN_LLONG",
-        rc4_asm_src      => "rc4-c64xplus.s",
         modes_asm_src    => "ghash-c64xplus.s",
         chacha_asm_src   => "chacha-c64xplus.s",
         poly1305_asm_src => "poly1305-c64xplus.s",
index 773235efb499f7ca39df2d8f22b8ec2c5d7888f5..b19e852ec541dee345d5c62be7f9443a85cc94e7 100644 (file)
@@ -240,9 +240,6 @@ In each table entry, the following keys are significant:
                                                 export vars as
                                                 accessor functions.
 
-        rc4_asm_src     => Assembler implementation of core RC4
-                           functions.
-                           Defaults to 'rc4_enc.c rc4_skey.c'
         rmd160_asm_src  => Assembler implementation of core RMD160
                            functions.
         rc5_asm_src     => Assembler implementation of core RC5
index c0039169244fac168e9608907ac21d452fa0e51b..ef80f0f486d7f203bd89a277d4ea18d0e5ac1062 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{rc4_asm_src} ne $table{DEFAULTS}->{rc4_asm_src}) {
-        push @{$config{lib_defines}}, "RC4_ASM";
-    }
     if ($target{rmd160_asm_src}) {
         push @{$config{lib_defines}}, "RMD160_ASM";
     }
@@ -3357,7 +3354,6 @@ sub print_table_entry
         "loutflag",
         "ex_libs",
         "bn_ops",
-        "rc4_asm_src",
         "rmd160_asm_src",
         "rc5_asm_src",
         "wp_asm_src",
index 8d272e4ff6d9f122a59629160b0a50ba62d63556..30e36bac107c9353c01d89715382f88d4453c8db 100644 (file)
@@ -1,6 +1,23 @@
 LIBS=../../libcrypto
-SOURCE[../../libcrypto]=\
-        {- $target{rc4_asm_src} -}
+
+$RC4ASM=rc4_enc.c rc4_skey.c
+IF[{- !$disabled{asm} -}]
+  $RC4ASM_x86=rc4-586.s
+  $RC4ASM_x86_64=rc4-x86_64.s rc4-md5-x86_64.s
+  $RC4ASM_s390x=rc4-s390x.s
+  $RC4ASM_parisc11=rc4-parisc.s
+  $RC4ASM_parisc20_64=$RC4ASM_parisc11
+  $RC4ASM_c64xplus=rc4-c64xplus.s
+
+  # Now that we have defined all the arch specific variables, use the
+  # appropriate one, and define the appropriate macros
+  IF[$RC4ASM_{- $target{asm_arch} -}]
+    $RC4ASM=$RC4ASM_{- $target{asm_arch} -}
+    $RC4DEF=RC4_ASM
+  ENDIF
+ENDIF
+
+SOURCE[../../libcrypto]=$RC4ASM
 
 GENERATE[rc4-586.s]=asm/rc4-586.pl \
         $(PERLASM_SCHEME) $(LIB_CFLAGS) $(LIB_CPPFLAGS) $(PROCESSOR)