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 14b7608ca53eb77be4dc9a7a607c49b4294fead4..46de7326768fc50277841078c7d2d481579694b8 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 84e7b20c7d51cfbecc42c6bf5582383167000a65..fa99539050c708694cc839b0f9d38ee813e85a9d 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 dd8c595b65ec7b22480ab93b2083abd4bc5eb576..63f7dc659b4d392d9d9aa31d3b72d4215b8f0830 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 3189f9f343c244ff7ee253b50e259b679148783b..77aab6d525836b1cb07bb60fbeafbdebd2d1897c 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} -}]