[Libreoffice-commits] core.git: config_host.mk.in configure.ac distro-configs/LibreOfficeOssFuzz.conf external/curl postprocess/Rdb_services.mk Repository.mk sd/Library_sd.mk solenv/bin xmlsecurity/Module_xmlsecurity.mk

Caolán McNamara caolanm at redhat.com
Tue Dec 20 14:21:38 UTC 2016


 Repository.mk                          |    4 +--
 config_host.mk.in                      |    1 
 configure.ac                           |   43 ++++++++++++++++-----------------
 distro-configs/LibreOfficeOssFuzz.conf |    1 
 external/curl/ExternalProject_curl.mk  |    4 +--
 postprocess/Rdb_services.mk            |    2 -
 sd/Library_sd.mk                       |    2 -
 solenv/bin/native-code.py              |    4 +--
 xmlsecurity/Module_xmlsecurity.mk      |    6 ++--
 9 files changed, 34 insertions(+), 33 deletions(-)

New commits:
commit 8092d344fa8cf9af692bc4e0ea544738a299b835
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Dec 19 13:19:57 2016 +0000

    use new ENABLE_NSS for code which needs nss
    
    which isn't available on a static-only build (iOS and fuzzing) and
    android
    
    Change-Id: I99bb7c0b45d4499579ddf73f469a762ddcae99ab
    Reviewed-on: https://gerrit.libreoffice.org/32182
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/Repository.mk b/Repository.mk
index 0695dae..3d3c3c5 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -1069,7 +1069,7 @@ $(eval $(call gb_Helper_register_resources,\
 	vcl \
 	writerperfect \
 	wzi \
-	$(if $(filter-out ANDROID IOS,$(OS)),xmlsec) \
+	$(if $(ENABLE_NSS),xmlsec) \
 	xsltdlg \
 ))
 
@@ -1116,7 +1116,7 @@ $(eval $(call gb_Helper_register_uiconfigs,\
 	uui \
 	vcl \
 	writerperfect \
-	$(if $(filter-out ANDROID IOS,$(OS)),xmlsec) \
+	$(if $(ENABLE_NSS),xmlsec) \
 ))
 
 ifeq ($(gb_GBUILDSELFTEST),t)
diff --git a/config_host.mk.in b/config_host.mk.in
index 7b3197e..13e0bde 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -151,6 +151,7 @@ export ENABLE_LWP=@ENABLE_LWP@
 export ENABLE_MACOSX_SANDBOX=@ENABLE_MACOSX_SANDBOX@
 export ENABLE_MEDIAWIKI=@ENABLE_MEDIAWIKI@
 export ENABLE_MARIADBC=@ENABLE_MARIADBC@
+export ENABLE_NSS=@ENABLE_NSS@
 export ENABLE_ONLINE_UPDATE=@ENABLE_ONLINE_UPDATE@
 export ENABLE_ONLINE_UPDATE_MAR=@ENABLE_ONLINE_UPDATE_MAR@
 export ENABLE_EXTENSION_UPDATE=@ENABLE_EXTENSION_UPDATE@
diff --git a/configure.ac b/configure.ac
index c45c44a..7146231 100644
--- a/configure.ac
+++ b/configure.ac
@@ -8990,6 +8990,28 @@ fi
 AC_SUBST(SYSTEM_OPENLDAP)
 
 dnl ===================================================================
+dnl Check for system NSS
+dnl ===================================================================
+if test $_os != iOS -a $_os != Android -a "$enable_fuzzers" != "yes"; then
+    libo_CHECK_SYSTEM_MODULE([nss],[NSS],[nss >= 3.9.3 nspr >= 4.8])
+    AC_DEFINE(HAVE_FEATURE_NSS)
+    ENABLE_NSS="TRUE"
+    AC_DEFINE(ENABLE_NSS)
+else
+    with_tls=openssl
+fi
+if test "$with_system_nss" = "yes"; then
+    libo_MINGW_CHECK_DLL([libnspr4])
+    libo_MINGW_CHECK_DLL([libplc4])
+    libo_MINGW_CHECK_DLL([libplds4])
+    libo_MINGW_CHECK_DLL([nss3])
+    libo_MINGW_CHECK_DLL([nssutil3])
+    libo_MINGW_CHECK_DLL([smime3])
+    libo_MINGW_CHECK_DLL([ssl3])
+fi
+AC_SUBST(ENABLE_NSS)
+
+dnl ===================================================================
 dnl Check for TLS/SSL and cryptographic implementation to use
 dnl ===================================================================
 AC_MSG_CHECKING([which TLS/SSL and cryptographic implementation to use])
@@ -9018,10 +9040,6 @@ nss - Mozilla's Network Security Services (NSS)
     ])
         ;;
     esac
-elif test $_os = iOS -o $_os = Android; then
-    # We don't build NSS for iOS and Android
-    AC_DEFINE(USE_TLS_OPENSSL)
-    TLS=OPENSSL
 else
     # default to using NSS, it results in smaller oox lib
     AC_DEFINE(USE_TLS_NSS)
@@ -9031,23 +9049,6 @@ AC_MSG_RESULT([$TLS])
 AC_SUBST(TLS)
 
 dnl ===================================================================
-dnl Check for system NSS
-dnl ===================================================================
-if test $_os != iOS -a "$enable_fuzzers" != "yes"; then
-    libo_CHECK_SYSTEM_MODULE([nss],[NSS],[nss >= 3.9.3 nspr >= 4.8])
-    AC_DEFINE(HAVE_FEATURE_NSS)
-fi
-if test "$with_system_nss" = "yes"; then
-    libo_MINGW_CHECK_DLL([libnspr4])
-    libo_MINGW_CHECK_DLL([libplc4])
-    libo_MINGW_CHECK_DLL([libplds4])
-    libo_MINGW_CHECK_DLL([nss3])
-    libo_MINGW_CHECK_DLL([nssutil3])
-    libo_MINGW_CHECK_DLL([smime3])
-    libo_MINGW_CHECK_DLL([ssl3])
-fi
-
-dnl ===================================================================
 dnl Check for system sane
 dnl ===================================================================
 AC_MSG_CHECKING([which sane header to use])
diff --git a/distro-configs/LibreOfficeOssFuzz.conf b/distro-configs/LibreOfficeOssFuzz.conf
index ed88956..a58a862 100644
--- a/distro-configs/LibreOfficeOssFuzz.conf
+++ b/distro-configs/LibreOfficeOssFuzz.conf
@@ -1,6 +1,5 @@
 --enable-fuzzers
 --disable-dynamic-loading
---with-tls=openssl
 --with-locales=en
 --enable-mergelibs
 --disable-runtime-optimizations
diff --git a/external/curl/ExternalProject_curl.mk b/external/curl/ExternalProject_curl.mk
index 1f70972..48d0b6a 100644
--- a/external/curl/ExternalProject_curl.mk
+++ b/external/curl/ExternalProject_curl.mk
@@ -10,7 +10,7 @@
 $(eval $(call gb_ExternalProject_ExternalProject,curl))
 
 $(eval $(call gb_ExternalProject_use_externals,curl,\
-	$(if $(filter TRUE,$(DISABLE_DYNLOADING)),,nss3) \
+	$(if $(ENABLE_NSS),nss3) \
 	zlib \
 ))
 
@@ -44,7 +44,7 @@ $(call gb_ExternalProject_get_state_target,curl,build):
 		./configure \
 			$(if $(filter IOS MACOSX,$(OS)),\
 				--with-darwinssl,\
-				$(if $(filter TRUE,$(DISABLE_DYNLOADING)),--without-nss,--with-nss$(if $(SYSTEM_NSS),,="$(call gb_UnpackedTarball_get_dir,nss)/dist/out"))) \
+				$(if $(ENABLE_NSS),--with-nss$(if $(SYSTEM_NSS),,="$(call gb_UnpackedTarball_get_dir,nss)/dist/out"),--without-nss)) \
 			--without-ssl --without-gnutls --without-polarssl --without-cyassl --without-axtls \
 			--without-libidn --enable-ftp --enable-ipv6 --enable-http --disable-gopher \
 			--disable-file --disable-ldap --disable-telnet --disable-dict --without-libssh2 \
diff --git a/postprocess/Rdb_services.mk b/postprocess/Rdb_services.mk
index 0c1614c..5972458 100644
--- a/postprocess/Rdb_services.mk
+++ b/postprocess/Rdb_services.mk
@@ -109,7 +109,7 @@ $(eval $(call gb_Rdb_add_components,services,\
 	xmloff/source/transform/xof \
 	xmloff/util/xo \
 	xmlscript/util/xmlscript \
-	$(if $(filter-out ANDROID IOS,$(OS)), \
+	$(if $(ENABLE_NSS), \
 		xmlsecurity/util/xmlsecurity \
 		xmlsecurity/util/xsec_fw \
 		xmlsecurity/util/xsec_xmlsec$(if $(filter WNT,$(OS)),.windows)) \
diff --git a/sd/Library_sd.mk b/sd/Library_sd.mk
index ae4bed4..184cb8b 100644
--- a/sd/Library_sd.mk
+++ b/sd/Library_sd.mk
@@ -94,7 +94,7 @@ $(eval $(call gb_Library_use_libraries,sd,\
 	ucbhelper \
 	utl \
 	vcl \
-	$(if $(filter-out ANDROID IOS,$(OS)),xmlsecurity) \
+	$(if $(ENABLE_NSS),xmlsecurity) \
 	$(gb_UWINAPI) \
 ))
 
diff --git a/solenv/bin/native-code.py b/solenv/bin/native-code.py
index f8336da..73b3487 100755
--- a/solenv/bin/native-code.py
+++ b/solenv/bin/native-code.py
@@ -48,10 +48,10 @@ core_factory_list = [
     ("libunordflo.a", "unordf_component_getFactory"),
     ("libunoxmllo.a", "unoxml_component_getFactory"),
     ("libutllo.a", "utl_component_getFactory"),
-    ("libxmlsecurity.a", "xmlsecurity_component_getFactory", "#if !defined ANDROID && HAVE_FEATURE_NSS"),
+    ("libxmlsecurity.a", "xmlsecurity_component_getFactory", "#if HAVE_FEATURE_NSS"),
     ("libxoflo.a", "xof_component_getFactory"),
     ("libxolo.a", "xo_component_getFactory"),
-    ("libxsec_xmlsec.a", "xsec_xmlsec_component_getFactory", "#if !defined ANDROID && HAVE_FEATURE_NSS"),
+    ("libxsec_xmlsec.a", "xsec_xmlsec_component_getFactory", "#if HAVE_FEATURE_NSS"),
     ("libxstor.a", "xstor_component_getFactory"),
     ("libvclcanvaslo.a", "vclcanvas_component_getFactory"),
     ("libmtfrendererlo.a", "mtfrenderer_component_getFactory"),
diff --git a/xmlsecurity/Module_xmlsecurity.mk b/xmlsecurity/Module_xmlsecurity.mk
index 4f00c22..b14729f 100644
--- a/xmlsecurity/Module_xmlsecurity.mk
+++ b/xmlsecurity/Module_xmlsecurity.mk
@@ -9,7 +9,9 @@
 
 $(eval $(call gb_Module_Module,xmlsecurity))
 
-ifneq (,$(filter-out ANDROID IOS,$(OS)))
+ifeq ($(ENABLE_NSS),TRUE)
+#FIXME: ^^^, get nss&libxmlsec building on ios and android
+#chromium has patches to build statically FWIW
 
 $(eval $(call gb_Module_add_targets,xmlsecurity,\
 	Library_xmlsecurity \
@@ -27,8 +29,6 @@ $(eval $(call gb_Module_add_l10n_targets,xmlsecurity,\
 	UIConfig_xmlsec \
 ))
 
-#FIXME: ^^^, get nss&libxmlsec building on ios and android
-
 # failing
 #$(eval $(call gb_Module_add_check_targets,xmlsecurity,\
 	CppunitTest_qa_certext \


More information about the Libreoffice-commits mailing list