[openssl-commits] [openssl] master update

Richard Levitte levitte at openssl.org
Tue Nov 15 14:15:00 UTC 2016


The branch master has been updated
       via  7b176a549ea374fc9b64c3fa7f0812239528b696 (commit)
      from  93880ce1338280aa048c4c65886fcd07c6147491 (commit)


- Log -----------------------------------------------------------------
commit 7b176a549ea374fc9b64c3fa7f0812239528b696
Author: Richard Levitte <levitte at openssl.org>
Date:   Mon Aug 29 16:58:31 2016 +0200

    Only build the body of e_padlock when there are lower level routines
    
    engines/e_padlock.c assumes that for all x86 and x86_64 platforms, the
    lower level routines will be present.  However, that's not always
    true, for example for solaris-x86-cc, and that leads to build errors.
    
    The better solution is to have configure detect if the lower level
    padlock routines are being built, and define the macro PADLOCK_ASM if
    they are, and use that macro in our C code.
    
    Reviewed-by: Andy Polyakov <appro at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/1510)

-----------------------------------------------------------------------

Summary of changes:
 Configure           |  3 +++
 engines/e_padlock.c | 10 +++-------
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/Configure b/Configure
index 70a59f5..2bdf87b 100755
--- a/Configure
+++ b/Configure
@@ -1206,6 +1206,9 @@ unless ($disabled{asm}) {
     if ($target{ec_asm_src} =~ /ecp_nistz256/) {
 	push @{$config{defines}}, "ECP_NISTZ256_ASM";
     }
+    if ($target{padlock_asm_src} ne $table{DEFAULTS}->{padlock_asm_src}) {
+	push @{$config{defines}}, "PADLOCK_ASM";
+    }
     if ($target{poly1305_asm_src} ne "") {
 	push @{$config{defines}}, "POLY1305_ASM";
     }
diff --git a/engines/e_padlock.c b/engines/e_padlock.c
index 77cebe3..b86f165 100644
--- a/engines/e_padlock.c
+++ b/engines/e_padlock.c
@@ -41,14 +41,10 @@
  */
 
 #  undef COMPILE_HW_PADLOCK
-#  if !defined(I386_ONLY) && !defined(OPENSSL_NO_ASM)
-#   if    defined(__i386__) || defined(__i386) ||    \
-        defined(__x86_64__) || defined(__x86_64) || \
-        defined(_M_IX86) || defined(_M_AMD64) || defined(_M_X64)
-#    define COMPILE_HW_PADLOCK
-#    ifdef OPENSSL_NO_DYNAMIC_ENGINE
+#  if !defined(I386_ONLY) && defined(PADLOCK_ASM)
+#   define COMPILE_HW_PADLOCK
+#   ifdef OPENSSL_NO_DYNAMIC_ENGINE
 static ENGINE *ENGINE_padlock(void);
-#    endif
 #   endif
 #  endif
 


More information about the openssl-commits mailing list