diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2021-04-23 13:45:05 +0200 |
---|---|---|
committer | Thorsten Behrens <thorsten.behrens@allotropia.de> | 2021-05-05 21:14:54 +0200 |
commit | 8a4173987edfeeb7e49c70617d43e3adc911d333 (patch) | |
tree | 24360e0c3fe2b2138f9a291f143f9a6667c53510 /xmlsecurity | |
parent | 013ddc4f5307df512767ca23b3922540b2b36d52 (diff) |
WASM: add initial support for Emscripten cross build
- configure with:
- --host=wasm64-local-emscripten
- had to make a few externals optional, so adding:
- --disable-nss
- --disable-cmis
- --disable-curl
Change-Id: I48d1c73d2675ad2e2beaf2c341578199efbd24ee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111130
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Diffstat (limited to 'xmlsecurity')
-rw-r--r-- | xmlsecurity/Library_xsec_xmlsec.mk | 50 | ||||
-rw-r--r-- | xmlsecurity/inc/pch/precompiled_xsec_xmlsec.hxx | 2 |
2 files changed, 39 insertions, 13 deletions
diff --git a/xmlsecurity/Library_xsec_xmlsec.mk b/xmlsecurity/Library_xsec_xmlsec.mk index bd2cb6abef20..450e19b3267b 100644 --- a/xmlsecurity/Library_xsec_xmlsec.mk +++ b/xmlsecurity/Library_xsec_xmlsec.mk @@ -51,7 +51,7 @@ endif $(eval $(call gb_Library_use_externals,xsec_xmlsec,\ boost_headers \ - gpgmepp \ + $(if $(ENABLE_GPGMEPP),gpgmepp) \ libxml2 \ xmlsec \ )) @@ -65,9 +65,6 @@ $(eval $(call gb_Library_add_exception_objects,xsec_xmlsec,\ xmlsecurity/source/xmlsec/xmlelementwrapper_xmlsecimpl \ xmlsecurity/source/xmlsec/xmlsec_init \ xmlsecurity/source/xmlsec/xmlstreamio \ - xmlsecurity/source/xmlsec/nss/ciphercontext \ - xmlsecurity/source/xmlsec/nss/digestcontext \ - xmlsecurity/source/xmlsec/nss/nssinitializer \ )) ifeq ($(ENABLE_GPGMEPP),TRUE) @@ -110,24 +107,36 @@ $(eval $(call gb_Library_add_exception_objects,xsec_xmlsec,\ xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl \ )) -else +ifeq ($(ENABLE_NSS),TRUE) -$(eval $(call gb_Library_add_defs,xsec_xmlsec,\ - -DXMLSEC_CRYPTO_NSS \ +$(eval $(call gb_Library_add_exception_objects,xsec_xmlsec,\ + xmlsecurity/source/xmlsec/nss/ciphercontext \ + xmlsecurity/source/xmlsec/nss/digestcontext \ + xmlsecurity/source/xmlsec/nss/nssinitializer \ )) +# nss3 after static libs to appease --as-needed linkers +$(eval $(call gb_Library_use_externals,xsec_xmlsec,\ + nss3 \ +)) + +endif + +else # !$(OS),WNT + ifeq ($(SYSTEM_XMLSEC),) $(eval $(call gb_Library_add_libs,xsec_xmlsec,\ - $(call gb_UnpackedTarball_get_dir,xmlsec)/src/nss/.libs/libxmlsec1-nss.a \ - $(call gb_UnpackedTarball_get_dir,xmlsec)/src/.libs/libxmlsec1.a \ + $(call gb_UnpackedTarball_get_dir,xmlsec)/src/nss/.libs/libxmlsec1-nss.a \ + $(call gb_UnpackedTarball_get_dir,xmlsec)/src/.libs/libxmlsec1.a \ )) endif -$(eval $(call gb_Library_use_externals,xsec_xmlsec,\ - plc4 \ -)) +ifeq ($(ENABLE_NSS),TRUE) $(eval $(call gb_Library_add_exception_objects,xsec_xmlsec,\ + xmlsecurity/source/xmlsec/nss/ciphercontext \ + xmlsecurity/source/xmlsec/nss/digestcontext \ + xmlsecurity/source/xmlsec/nss/nssinitializer \ xmlsecurity/source/xmlsec/nss/sanextension_nssimpl \ xmlsecurity/source/xmlsec/nss/secerror \ xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl \ @@ -137,17 +146,32 @@ $(eval $(call gb_Library_add_exception_objects,xsec_xmlsec,\ xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl \ )) -endif +$(eval $(call gb_Library_add_defs,xsec_xmlsec,\ + -DXMLSEC_CRYPTO_NSS \ +)) +$(eval $(call gb_Library_use_externals,xsec_xmlsec,\ + plc4 \ +)) # nss3 after static libs to appease --as-needed linkers $(eval $(call gb_Library_use_externals,xsec_xmlsec,\ nss3 \ )) +else # ! $(ENABLE_NSS) + +ifeq ($(ENABLE_OPENSSL),TRUE) +$(eval $(call gb_Library_use_external,xsec_xmlsec,openssl)) +endif + +endif # !$(ENABLE_NSS) + ifeq ($(OS),SOLARIS) $(eval $(call gb_Library_add_libs,xsec_xmlsec,\ -ldl \ )) endif +endif # !$(OS),WNT + # vim: set noet sw=4 ts=4: diff --git a/xmlsecurity/inc/pch/precompiled_xsec_xmlsec.hxx b/xmlsecurity/inc/pch/precompiled_xsec_xmlsec.hxx index 31365ab4bb53..3ed7749687d1 100644 --- a/xmlsecurity/inc/pch/precompiled_xsec_xmlsec.hxx +++ b/xmlsecurity/inc/pch/precompiled_xsec_xmlsec.hxx @@ -33,7 +33,9 @@ #include <memory> #include <new> #include <ostream> +#ifdef XMLSEC_CRYPTO_NSS #include <pk11pub.h> +#endif #include <stddef.h> #include <string.h> #include <string> |