diff options
-rw-r--r-- | external/xmlsec/ExternalProject_xmlsec.mk | 1 | ||||
-rw-r--r-- | external/xmlsec/UnpackedTarball_xmlsec.mk | 1 | ||||
-rw-r--r-- | external/xmlsec/xmlsec1-vc.patch.1 | 79 |
3 files changed, 65 insertions, 16 deletions
diff --git a/external/xmlsec/ExternalProject_xmlsec.mk b/external/xmlsec/ExternalProject_xmlsec.mk index 5f305865436a..7b9667ea5bc7 100644 --- a/external/xmlsec/ExternalProject_xmlsec.mk +++ b/external/xmlsec/ExternalProject_xmlsec.mk @@ -26,6 +26,7 @@ $(call gb_ExternalProject_get_state_target,xmlsec,build) : cscript /e:javascript configure.js crypto=mscng xslt=no iconv=no static=no \ lib=$(call gb_UnpackedTarball_get_dir,libxml2)/win32/bin.msvc \ $(if $(filter TRUE,$(ENABLE_DBGUTIL)),debug=yes cruntime=/MDd) \ + cflags="-arch:SSE $(SOLARINC) -I$(WORKDIR)/UnpackedTarball/libxml2/include -I$(WORKDIR)/UnpackedTarball/icu/source/i18n -I$(WORKDIR)/UnpackedTarball/icu/source/common" \ && nmake \ ,win32) diff --git a/external/xmlsec/UnpackedTarball_xmlsec.mk b/external/xmlsec/UnpackedTarball_xmlsec.mk index f62207fd5b3e..53af3b1f1e8c 100644 --- a/external/xmlsec/UnpackedTarball_xmlsec.mk +++ b/external/xmlsec/UnpackedTarball_xmlsec.mk @@ -9,6 +9,7 @@ xmlsec_patches := xmlsec_patches += xmlsec1-configure.patch.1 +# Backport of <https://github.com/lsh123/xmlsec/pull/223>. xmlsec_patches += xmlsec1-vc.patch.1 # Backport of <https://github.com/lsh123/xmlsec/pull/192>. xmlsec_patches += mscng-fixes.patch.1 diff --git a/external/xmlsec/xmlsec1-vc.patch.1 b/external/xmlsec/xmlsec1-vc.patch.1 index 6e6834d1fb39..5c8bcd6db19a 100644 --- a/external/xmlsec/xmlsec1-vc.patch.1 +++ b/external/xmlsec/xmlsec1-vc.patch.1 @@ -1,26 +1,73 @@ -From 654d217917039a1abbdad20e2ce94555cedf0785 Mon Sep 17 00:00:00 2001 +From a2077431caf7950b1174cbc03e36bfb2916a9dc1 Mon Sep 17 00:00:00 2001 From: Miklos Vajna <vmiklos@collabora.co.uk> -Date: Fri, 4 Mar 2016 16:12:29 +0100 -Subject: [PATCH] xmlsec1-vc.patch +Date: Sat, 22 Sep 2018 16:03:18 +0200 +Subject: [PATCH] win32: allow custom compiler flags (#223) -Conflicts: - win32/Makefile.msvc +Use-case is e.g. wanting to build the code with -arch:SSE. And this improves +consistency, autotools allows custom compiler flags as well. --- - win32/Makefile.msvc | 4 ++++ - 1 file changed, 4 insertions(+) + win32/Makefile.msvc | 2 +- + win32/configure.js | 6 ++++++ + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/win32/Makefile.msvc b/win32/Makefile.msvc -index e7cd5c38..51c91399 100644 +index 7eb02efc..9c9673bf 100644 --- a/win32/Makefile.msvc +++ b/win32/Makefile.msvc -@@ -363,6 +363,7 @@ CFLAGS = $(CFLAGS) /D "HAVE_STDIO_H" /D "HAVE_STDLIB_H" - CFLAGS = $(CFLAGS) /D "HAVE_STRING_H" /D "HAVE_CTYPE_H" - CFLAGS = $(CFLAGS) /D "HAVE_MALLOC_H" /D "HAVE_MEMORY_H" - CFLAGS = $(CFLAGS) /D "XMLSEC_NO_GOST" /D "XMLSEC_NO_GOST2012" -+CFLAGS = $(CFLAGS) -arch:SSE $(SOLARINC) -I$(WORKDIR)\UnpackedTarball\libxml2\include -I$(WORKDIR)/UnpackedTarball/icu/source/i18n -I$(WORKDIR)/UnpackedTarball/icu/source/common - - !if "$(UNICODE)" == "1" - CFLAGS = $(CFLAGS) /D "UNICODE" /D "_UNICODE" +@@ -347,7 +347,7 @@ + # + # The compiler and its options. + # +-CFLAGS = /nologo /D "WIN32" /D "_WINDOWS" /D inline=__inline ++CFLAGS = $(CFLAGS) /nologo /D "WIN32" /D "_WINDOWS" /D inline=__inline + # C4130: '!=': logical operation on address of string constant: + # this generates a false warning inside macros + CFLAGS = $(CFLAGS) /D "_MBCS" /D "_REENTRANT" /W4 /wd4130 +diff --git a/win32/configure.js b/win32/configure.js +index 9773617c..854a46af 100644 +--- a/win32/configure.js ++++ b/win32/configure.js +@@ -57,6 +57,7 @@ var buildUnicode = 1; + var buildDebug = 0; + var buildWerror = 0; + var buildCc = "cl.exe"; ++var buildCflags = ""; + var buildStatic = 1; + var buildWithDLSupport = 1; + var buildPrefix = "."; +@@ -116,6 +117,7 @@ function usage() + txt += " debug: Build unoptimised debug executables (" + (buildDebug? "yes" : "no") + ")\n"; + txt += " werror: Build with warnings as errors(" + (buildWerror? "yes" : "no") + ")\n"; + txt += " cc: Build with the specified compiler(" + buildCc + ")\n"; ++ txt += " cflags: Build with the specified compiler flags('" + buildCflags + "')\n"; + txt += " static: Link libxmlsec statically to xmlsec (" + (buildStatic? "yes" : "no") + ")\n"; + txt += " with-dl: Enable dynamic loading of xmlsec-crypto libraries (" + (buildWithDLSupport? "yes" : "no") + ")\n"; + txt += " prefix: Base directory for the installation (" + buildPrefix + ")\n"; +@@ -181,6 +183,7 @@ function discoverVersion() + vf.WriteLine("DEBUG=" + (buildDebug? "1" : "0")); + vf.WriteLine("WERROR=" + (buildWerror? "1" : "0")); + vf.WriteLine("CC=" + buildCc); ++ vf.WriteLine("CFLAGS=" + buildCflags); + vf.WriteLine("STATIC=" + (buildStatic? "1" : "0")); + vf.WriteLine("WITH_DL=" + (buildWithDLSupport ? "1" : "0")); + vf.WriteLine("PREFIX=" + buildPrefix); +@@ -317,6 +320,8 @@ for (i = 0; (i < WScript.Arguments.length) && (error == 0); i++) { + buildWerror = strToBool(arg.substring(opt.length + 1, arg.length)); + else if (opt == "cc") + buildCc = arg.substring(opt.length + 1, arg.length); ++ else if (opt == "cflags") ++ buildCflags = arg.substring(opt.length + 1, arg.length); + else if (opt == "static") + buildStatic = strToBool(arg.substring(opt.length + 1, arg.length)); + else if (opt == "with-dl") +@@ -444,6 +449,7 @@ txtOut += " Unicode: " + boolToStr(buildUnicode) + "\n"; + txtOut += " Debug symbols: " + boolToStr(buildDebug) + "\n"; + txtOut += "Warnings as errors: " + boolToStr(buildWerror) + "\n"; + txtOut += " C compiler: " + buildCc + "\n"; ++txtOut += " C compiler flags: " + buildCflags + "\n"; + txtOut += " Static xmlsec: " + boolToStr(buildStatic) + "\n"; + txtOut += " Enable DL support: " + boolToStr(buildWithDLSupport) + "\n"; + txtOut += " Install prefix: " + buildPrefix + "\n"; -- 2.16.3 |