[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - external/openssl

Tor Lillqvist (via logerrit) logerrit at kemper.freedesktop.org
Sun Nov 15 09:10:48 UTC 2020


 external/openssl/ExternalProject_openssl.mk  |    1 +
 external/openssl/UnpackedTarball_openssl.mk  |    1 +
 external/openssl/openssl-macos-arm64.patch.1 |   13 +++++++++++++
 3 files changed, 15 insertions(+)

New commits:
commit 4f2dbffd16ef7bf597545e099eb0624a5bceed9f
Author:     Tor Lillqvist <tml at iki.fi>
AuthorDate: Sun Jul 5 01:11:20 2020 +0300
Commit:     Tor Lillqvist <tml at collabora.com>
CommitDate: Sun Nov 15 10:10:18 2020 +0100

    Initial attempt at macOS on arm64 support for OpenSSL
    
    Sadly the existing arm64 assembler files in OpenSSL use a syntax that
    Apple's clang doesn't accept.
    
    And yeah, ideally we should not use either NSS or OpenSSL on macOS,
    but native APIs for the functionality in question. Trying to make
    everything look like Linux is a bone-headed approach.
    
    Change-Id: Ib3f137ac73329b92e82c654d1277ee21f5f81b37
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98095
    Tested-by: Jenkins
    Reviewed-by: Tor Lillqvist <tml at collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105871
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>

diff --git a/external/openssl/ExternalProject_openssl.mk b/external/openssl/ExternalProject_openssl.mk
index 5f5fb42c5eef..ef6d3155ca4a 100644
--- a/external/openssl/ExternalProject_openssl.mk
+++ b/external/openssl/ExternalProject_openssl.mk
@@ -48,6 +48,7 @@ OPENSSL_PLATFORM := \
             $(if $(filter POWERPC,$(CPUNAME)),darwin-ppc-cc)\
             $(if $(filter INTEL,$(CPUNAME)),darwin-i386-cc)\
             $(if $(filter X86_64,$(CPUNAME)),darwin64-x86_64-cc)\
+            $(if $(filter ARM64,$(CPUNAME)),darwin64-arm64-cc)\
           )\
         )\
       )\
diff --git a/external/openssl/UnpackedTarball_openssl.mk b/external/openssl/UnpackedTarball_openssl.mk
index 719b8b0e5842..f399a0417691 100644
--- a/external/openssl/UnpackedTarball_openssl.mk
+++ b/external/openssl/UnpackedTarball_openssl.mk
@@ -21,6 +21,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,openssl,\
 	external/openssl/opensslosxppc.patch \
 	external/openssl/openssl-3650-masm.patch.1 \
 	external/openssl/openssl-fixbuild.patch.1 \
+	external/openssl/openssl-macos-arm64.patch.1 \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/openssl/openssl-macos-arm64.patch.1 b/external/openssl/openssl-macos-arm64.patch.1
new file mode 100644
index 000000000000..f0be9dbab760
--- /dev/null
+++ b/external/openssl/openssl-macos-arm64.patch.1
@@ -0,0 +1,13 @@
+-*- Mode: diff -*-
+
+--- a/Configure
++++ b/Configure
+@@ -620,6 +620,8 @@
+ "debug-darwin-i386-cc","cc:-arch i386 -g3 -DL_ENDIAN::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:BN_LLONG RC4_INT RC4_CHUNK DES_UNROLL BF_PTR:${x86_asm}:macosx:dlfcn:darwin-shared:-fPIC -fno-common:-arch i386 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
+ "darwin64-x86_64-cc","cc:-arch x86_64 -O3 -DL_ENDIAN -Wall::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:".eval{my $asm=$x86_64_asm;$asm=~s/rc4\-[^:]+//;$asm}.":macosx:dlfcn:darwin-shared:-fPIC -fno-common:-arch x86_64 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
+ "debug-darwin64-x86_64-cc","cc:-arch x86_64 -ggdb -g2 -O0 -DL_ENDIAN -Wall::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:".eval{my $asm=$x86_64_asm;$asm=~s/rc4\-[^:]+//;$asm}.":macosx:dlfcn:darwin-shared:-fPIC -fno-common:-arch x86_64 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
++"darwin64-arm64-cc","cc:-arch arm64 -O3 -DL_ENDIAN -Wall::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${no_asm}:macosx:dlfcn:darwin-shared:-fPIC -fno-common:-arch x86_64 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
++"debug-darwin64-arm64-cc","cc:-arch arm64 -ggdb -g2 -O0 -DL_ENDIAN -Wall::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${no_asm}:macosx:dlfcn:darwin-shared:-fPIC -fno-common:-arch x86_64 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
+ "debug-darwin-ppc-cc","cc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DB_ENDIAN -g -Wall -O::-D_REENTRANT:MACOSX::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${ppc32_asm}:osx32:dlfcn:darwin-shared:-fPIC:-dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
+ # iPhoneOS/iOS
+ "iphoneos-cross","llvm-gcc:-O3 -isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK) -fomit-frame-pointer -fno-common::-D_REENTRANT:iOS:-Wl,-search_paths_first%:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${no_asm}:dlfcn:darwin-shared:-fPIC -fno-common:-dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",


More information about the Libreoffice-commits mailing list