Move padlock_asm_src file information to build.info files
authorRichard Levitte <levitte@openssl.org>
Sun, 16 Jun 2019 20:39:19 +0000 (22:39 +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/README
Configure
engines/build.info

index 14b7608..46de732 100644 (file)
@@ -14,8 +14,6 @@ my %targets=(
        thread_scheme   => "(unknown)", # Assume we don't know
        thread_defines  => [],
 
-       padlock_asm_src => "",
-
        unistd          => "<unistd.h>",
        shared_target   => "",
        shared_cflag    => "",
@@ -151,7 +149,6 @@ my %targets=(
 
     x86_asm => {
        template        => 1,
-       padlock_asm_src => "e_padlock-x86.s",
     },
     x86_elf_asm => {
        template        => 1,
@@ -159,7 +156,6 @@ my %targets=(
     },
     x86_64_asm => {
        template        => 1,
-       padlock_asm_src => "e_padlock-x86_64.s",
     },
     ia64_asm => {
        template        => 1,
index 84e7b20..fa99539 100644 (file)
@@ -240,11 +240,6 @@ In each table entry, the following keys are significant:
                                                 export vars as
                                                 accessor functions.
 
-        padlock_asm_src => Assembler implementation of core parts of
-                           the padlock engine.  This is mandatory on
-                           any platform where the padlock engine might
-                           actually be built.
-
 
 [1] as part of the target configuration, one can have a key called
     'inherit_from' that indicate what other configurations to inherit
index dd8c595..63f7dc6 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -1404,9 +1404,6 @@ if ($target{sys_id} ne "")
         }
 
 unless ($disabled{asm}) {
-    if ($target{padlock_asm_src} ne $table{DEFAULTS}->{padlock_asm_src}) {
-        push @{$config{dso_defines}}, "PADLOCK_ASM";
-    }
 }
 
 my %predefined_C = compiler_predefined($config{CROSS_COMPILE}.$config{CC});
@@ -3335,7 +3332,6 @@ sub print_table_entry
         "loutflag",
         "ex_libs",
         "bn_ops",
-        "padlock_asm_src",
         "poly1035_asm_src",
         "thread_scheme",
         "perlasm_scheme",
index 3189f9f..77aab6d 100644 (file)
@@ -1,9 +1,22 @@
 IF[{- !$disabled{"engine"} -}]
+  $PADLOCKASM=
+  IF[{- !$disabled{asm} -}]
+    $PADLOCKASM_x86=e_padlock-x86.s
+    $PADLOCKASM_x86_64=e_padlock-x86_64.s
+
+    # Now that we have defined all the arch specific variables, use the
+    # appropriate one, and define the appropriate macros
+    IF[$PADLOCKASM_{- $target{asm_arch} -}]
+      $PADLOCKASM=$PADLOCKASM_{- $target{asm_arch} -}
+      $PADLOCKDEF=PADLOCK_ASM
+    ENDIF
+  ENDIF
+
   IF[{- $disabled{"dynamic-engine"} -}]
     LIBS=../libcrypto
     IF[{- !$disabled{padlockeng} -}]
-      SOURCE[../libcrypto]=\
-              e_padlock.c {- $target{padlock_asm_src} -}
+      SOURCE[../libcrypto]=e_padlock.c $PADLOCKASM
+      DEFINE[../libcrypto]=$PADLOCKDEF
     ENDIF
     IF[{- !$disabled{capieng} -}]
       SOURCE[../libcrypto]=e_capi.c
@@ -17,7 +30,8 @@ IF[{- !$disabled{"engine"} -}]
   ELSE
     IF[{- !$disabled{padlockeng} -}]
       MODULES{engine}=padlock
-      SOURCE[padlock]=e_padlock.c {- $target{padlock_asm_src} -}
+      SOURCE[padlock]=e_padlock.c $PADLOCKASM
+      DEFINE[padlock]=$PADLOCKDEF
       DEPEND[padlock]=../libcrypto
       INCLUDE[padlock]=../include
       IF[{- defined $target{shared_defflag} -}]