summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2018-01-08 12:31:39 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2018-01-09 09:45:14 +0100
commite90788e6ce5dc5459139f4ef03dc11b8af930772 (patch)
tree9efcfe4d00157b1677c55a57251b58a36ac8bbf6
parentbaf8708ace3e0f2f6fb3cd1bc22f73e3bd1adf50 (diff)
openssl: MSVC build: link and run MSASM with /SAFESEH
Actually the assembler requires lowercase /safeseh, oddly enough. Change-Id: I1569409a2d6358282a7463ea996a6b1615e6ed8c (cherry picked from commit 8f3ca0831993f7d687d7fc0feb1abe0c67a413bd) Reviewed-on: https://gerrit.libreoffice.org/47584 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
-rw-r--r--external/openssl/UnpackedTarball_openssl.mk1
-rw-r--r--external/openssl/opensslwnt_safeseh.patch23
2 files changed, 24 insertions, 0 deletions
diff --git a/external/openssl/UnpackedTarball_openssl.mk b/external/openssl/UnpackedTarball_openssl.mk
index 5845e31a436a..719b8b0e5842 100644
--- a/external/openssl/UnpackedTarball_openssl.mk
+++ b/external/openssl/UnpackedTarball_openssl.mk
@@ -14,6 +14,7 @@ $(eval $(call gb_UnpackedTarball_set_tarball,openssl,$(OPENSSL_TARBALL),,openssl
$(eval $(call gb_UnpackedTarball_add_patches,openssl,\
external/openssl/openssllnx.patch \
external/openssl/opensslwnt.patch \
+ $(if $(filter INTEL,$(CPUNAME)),external/openssl/opensslwnt_safeseh.patch) \
external/openssl/openssl-1.0.1h-win64.patch.1 \
external/openssl/opensslsol.patch \
external/openssl/opensslios.patch \
diff --git a/external/openssl/opensslwnt_safeseh.patch b/external/openssl/opensslwnt_safeseh.patch
new file mode 100644
index 000000000000..f2eafab5b9ed
--- /dev/null
+++ b/external/openssl/opensslwnt_safeseh.patch
@@ -0,0 +1,23 @@
+use /safeseh in 32-bit MSVC builds; this is not required for 64-bit
+
+diff -ru openssl.orig/util/mk1mf.pl openssl/util/mk1mf.pl
+--- a/openssl.orig/util/mk1mf.pl 2016-03-03 20:22:21.043924505 +0100
++++ b/openssl/util/mk1mf.pl 2016-03-03 20:34:45.015901171 +0100
+@@ -488,7 +493,7 @@
+ SRC_D=$src_dir
+
+ LINK_CMD=$link
+-LFLAGS=$lflags
++LFLAGS=$lflags /SAFESEH
+ RSC=$rsc \$(SOLARINC)
+
+ # The output directory for everything interesting
+@@ -511,7 +516,7 @@
+ MKDIR=$mkdir
+ MKLIB=$bin_dir$mklib
+ MLFLAGS=$mlflags
+-ASM=$bin_dir$asm
++ASM=$bin_dir$asm /safeseh
+
+ # FIPS validated module and support file locations
+