Browse Source

Move padlock_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 4 years ago
parent
commit
3a561b06d9
4 changed files with 17 additions and 16 deletions
  1. 0 4
      Configurations/00-base-templates.conf
  2. 0 5
      Configurations/README
  3. 0 4
      Configure
  4. 17 3
      engines/build.info

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

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

+ 0 - 5
Configurations/README

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

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

+ 17 - 3
engines/build.info

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