Browse Source

Move rc4_asm_src file information to build.info files

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/9166)
Richard Levitte 5 years ago
parent
commit
6b90902faf
5 changed files with 19 additions and 15 deletions
  1. 0 5
      Configurations/00-base-templates.conf
  2. 0 1
      Configurations/10-main.conf
  3. 0 3
      Configurations/README
  4. 0 4
      Configure
  5. 19 2
      crypto/rc4/build.info

+ 0 - 5
Configurations/00-base-templates.conf

@@ -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 => {

+ 0 - 1
Configurations/10-main.conf

@@ -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",

+ 0 - 3
Configurations/README

@@ -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

+ 0 - 4
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",

+ 19 - 2
crypto/rc4/build.info

@@ -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)