Move chacha_asm_src file information to build.info files
authorRichard Levitte <levitte@openssl.org>
Sun, 16 Jun 2019 20:21:50 +0000 (22:21 +0200)
committerRichard Levitte <levitte@openssl.org>
Mon, 17 Jun 2019 14:08:53 +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
Configure
crypto/chacha/build.info

index 5c73ce35ade0a176ceb33e17ba5d80e240603ce4..5427af8a4bb31fb3a2ded6ee97a108148b0d95a8 100644 (file)
@@ -15,7 +15,6 @@ my %targets=(
        thread_defines  => [],
 
        padlock_asm_src => "",
-       chacha_asm_src  => "chacha_enc.c",
        poly1305_asm_src        => "",
        keccak1600_asm_src      => "keccak1600.c",
 
@@ -155,7 +154,6 @@ my %targets=(
     x86_asm => {
        template        => 1,
        padlock_asm_src => "e_padlock-x86.s",
-       chacha_asm_src  => "chacha-x86.s",
        poly1305_asm_src=> "poly1305-x86.s",
     },
     x86_elf_asm => {
@@ -165,13 +163,11 @@ my %targets=(
     x86_64_asm => {
        template        => 1,
        padlock_asm_src => "e_padlock-x86_64.s",
-       chacha_asm_src  => "chacha-x86_64.s",
        poly1305_asm_src=> "poly1305-x86_64.s",
        keccak1600_asm_src      => "keccak1600-x86_64.s",
     },
     ia64_asm => {
        template        => 1,
-       chacha_asm_src  => "chacha-ia64.S",
        poly1305_asm_src=> "asm/poly1305-ia64.S",
     },
     sparcv9_asm => {
@@ -194,19 +190,16 @@ my %targets=(
     },
     s390x_asm => {
        template        => 1,
-       chacha_asm_src  => "chacha-s390x.S",
        poly1305_asm_src=> "poly1305-s390x.S",
        keccak1600_asm_src      => "keccak1600-s390x.S",
     },
     armv4_asm => {
        template        => 1,
-       chacha_asm_src  => "chacha-armv4.S",
        poly1305_asm_src=> "poly1305-armv4.S",
        keccak1600_asm_src      => "keccak1600-armv4.S",
     },
     aarch64_asm => {
        template        => 1,
-       chacha_asm_src  => "chacha-armv8.S",
        poly1305_asm_src=> "poly1305-armv8.S",
        keccak1600_asm_src      => "keccak1600-armv8.S",
     },
@@ -219,7 +212,6 @@ my %targets=(
     },
     ppc32_asm => {
        template        => 1,
-       chacha_asm_src  => "chacha-ppc.s",
        poly1305_asm_src=> "poly1305-ppc.s poly1305-ppcfp.s",
     },
     ppc64_asm => {
index 450fe0dcb8eb782c2beeac6ae2e23aee548f2218..69a3710f3c5e13a7a0b70b168585269fda3c175e 100644 (file)
@@ -949,7 +949,6 @@ my %targets = (
         cppflags         => combine("-DOPENSSL_SMALL_FOOTPRINT",
                                     threads("-D_REENTRANT")),
         bn_ops           => "BN_LLONG",
-        chacha_asm_src   => "chacha-c64xplus.s",
         poly1305_asm_src => "poly1305-c64xplus.s",
         thread_scheme    => "pthreads",
         asm_arch         => 'c64xplus',
index c88cd45899c6bb160bc972f283bbe8c2ca01ee6d..7f37d15c199958ba1d22ed49dd433000a6c3185e 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -3342,7 +3342,6 @@ sub print_table_entry
         "ex_libs",
         "bn_ops",
         "padlock_asm_src",
-        "chacha_asm_src",
         "poly1035_asm_src",
         "thread_scheme",
         "perlasm_scheme",
index a7418265a226135da9f9ac8af1709a7b4af6b47f..e8eeaf0ce9832138687aeb505e7fa035ca4139cf 100644 (file)
@@ -1,5 +1,30 @@
 LIBS=../../libcrypto
-SOURCE[../../libcrypto]={- $target{chacha_asm_src} -}
+
+$CHACHAASM=chacha_enc.c
+IF[{- !$disabled{asm} -}]
+  $CHACHAASM_x86=chacha-x86.s
+  $CHACHAASM_x86_64=chacha-x86_64.s
+
+  $CHACHAASM_ia64=chacha-ia64.S
+
+  $CHACHAASM_s390x=chacha-s390x.S
+
+  $CHACHAASM_armv4=chacha-armv4.S
+  $CHACHAASM_aarch64=chacha-armv8.S
+
+  $CHACHAASM_ppc32=chacha-ppc.s
+  $CHACHAASM_ppc64=$CHACHAASM_ppc32
+
+  $CHACHAASM_c64xplus=chacha-c64xplus.s
+
+  # Now that we have defined all the arch specific variables, use the
+  # appropriate one
+  IF[$CHACHAASM_{- $target{asm_arch} -}]
+    $CHACHAASM=$CHACHAASM_{- $target{asm_arch} -}
+  ENDIF
+ENDIF
+
+SOURCE[../../libcrypto]=$CHACHAASM
 
 GENERATE[chacha-x86.s]=asm/chacha-x86.pl \
         $(PERLASM_SCHEME) $(LIB_CFLAGS) $(LIB_CPPFLAGS) $(PROCESSOR)