summaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2022-03-26 20:46:56 +0100
committerJan-Marek Glogowski <glogow@fbihome.de>2022-03-30 15:12:21 +0200
commit79365d6f5a3706da8464d564deee6bb54422c3d0 (patch)
treed3b89f7b5875759ef96d3a1125234bb531a57ba1 /external
parent21c24aa4fdea118ddda0b60e17486458c739375f (diff)
WASM fix native EH build since Emscripten 3.1.6
Building LO with WASM native EH and Emscripten 3.1.6+, the link fails with a missing "emscripten_longjmp" symbol. Actually the old build was simply wrong, because the emscripten_longjmp function is just used for the Emscripten SjLj and not the native WASM SjLj implementation. Linking just worked, because the used libcompiler_rt-wasm-sjlj-mt.a lib was incorrectly providing that symbol, which 3.1.6 removed. But since running the NEH build still fails early in the same way then before in FF nightly 100 and Chrome (= failure in the LO job scheduler calling Task::UpdateMinPeriod for the "desktop::Desktop m_firstRunTimer" timer, resulting in a WASM VM "RuntimeError: indirect call signature mismatch"), there is still no way to know, if nothing else it missing. The Emscripten / JS EH build still works without any code changes. And it's not the first call on a job object that fails... And unfortunatly, because Qt itself also uses libpng, it also uses SjLj for error handling, like LO in the image import, so the Qt build must also be patched to build with "-s SUPPORT_LONGJMP=wasm". Simply enough to do (see README.wasm.md). LO's configure now detects that symbol and will bail out on incompatible Qt and LO build setup. See https://github.com/emscripten-core/emscripten/issues/16572 Change-Id: I3a1877f3aeb77873906176b9d3cd1ea92973f1f6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132139 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'external')
-rw-r--r--external/cairo/ExternalProject_cairo.mk2
-rw-r--r--external/cppunit/ExternalProject_cppunit.mk4
-rw-r--r--external/freetype/ExternalProject_freetype.mk2
-rw-r--r--external/libnumbertext/ExternalProject_libnumbertext.mk4
4 files changed, 6 insertions, 6 deletions
diff --git a/external/cairo/ExternalProject_cairo.mk b/external/cairo/ExternalProject_cairo.mk
index f1bf3ddbd1b2..0996572d63ba 100644
--- a/external/cairo/ExternalProject_cairo.mk
+++ b/external/cairo/ExternalProject_cairo.mk
@@ -48,7 +48,7 @@ $(call gb_ExternalProject_get_state_target,cairo,build) :
$(gb_RUN_CONFIGURE) ./configure \
$(if $(debug),STRIP=" ") \
$(if $(filter ANDROID iOS,$(OS)),CFLAGS="$(if $(debug),-g) $(ZLIB_CFLAGS) $(gb_VISIBILITY_FLAGS)") \
- $(if $(filter EMSCRIPTEN,$(OS)),CFLAGS=" $(ZLIB_CFLAGS) -Wno-enum-conversion" --enable-pthread=yes PTHREAD_LIBS="") \
+ $(if $(filter EMSCRIPTEN,$(OS)),CFLAGS=" $(ZLIB_CFLAGS) -Wno-enum-conversion $(gb_EMSCRIPTEN_CPPFLAGS)" --enable-pthread=yes PTHREAD_LIBS="") \
$(if $(filter-out EMSCRIPTEN ANDROID iOS,$(OS)),CFLAGS="$(CFLAGS) $(if $(debug),-g) $(ZLIB_CFLAGS)" ) \
$(if $(filter ANDROID iOS,$(OS)),PKG_CONFIG=./dummy_pkg_config) \
LIBS="$(ZLIB_LIBS)" \
diff --git a/external/cppunit/ExternalProject_cppunit.mk b/external/cppunit/ExternalProject_cppunit.mk
index 3c6e18af71d2..f0b4ff06acce 100644
--- a/external/cppunit/ExternalProject_cppunit.mk
+++ b/external/cppunit/ExternalProject_cppunit.mk
@@ -28,7 +28,7 @@ $(call gb_ExternalProject_get_state_target,cppunit,build) :
$(call gb_Trace_EndRange,cppunit,EXTERNAL)
else
-cppunit_CXXFLAGS=$(CXXFLAGS)
+cppunit_CXXFLAGS=$(CXXFLAGS) $(gb_EMSCRIPTEN_CXXFLAGS)
cppunit_CXXFLAGS+=$(gb_COMPILERDEFS_STDLIB_DEBUG)
@@ -52,7 +52,7 @@ $(call gb_ExternalProject_get_state_target,cppunit,build) :
$(if $(filter SOLARIS,$(OS)),LIBS="-lm") \
$(if $(filter ANDROID,$(OS)),LIBS="$(gb_STDLIBS)") \
$(if $(verbose),--disable-silent-rules,--enable-silent-rules) \
- CXXFLAGS="$(cppunit_CXXFLAGS) $(gb_EMSCRIPTEN_CPPFLAGS)" \
+ CXXFLAGS="$(cppunit_CXXFLAGS)" \
&& cd src \
&& $(MAKE) \
)
diff --git a/external/freetype/ExternalProject_freetype.mk b/external/freetype/ExternalProject_freetype.mk
index 57e7df357de4..7f3faca416ca 100644
--- a/external/freetype/ExternalProject_freetype.mk
+++ b/external/freetype/ExternalProject_freetype.mk
@@ -26,7 +26,7 @@ $(call gb_ExternalProject_get_state_target,freetype,build) :
--without-png \
--prefix=$(call gb_UnpackedTarball_get_dir,freetype/instdir) \
$(gb_CONFIGURE_PLATFORMS) \
- CFLAGS="$(CFLAGS) $(if $(debug),-g) $(gb_VISIBILITY_FLAGS)" \
+ CFLAGS="$(CFLAGS) $(if $(debug),-g) $(gb_VISIBILITY_FLAGS) $(gb_EMSCRIPTEN_CPPFLAGS)" \
&& $(MAKE) install \
&& touch $@ )
$(call gb_Trace_EndRange,freetype,EXTERNAL)
diff --git a/external/libnumbertext/ExternalProject_libnumbertext.mk b/external/libnumbertext/ExternalProject_libnumbertext.mk
index 976d1772c4b0..1716f9db8a12 100644
--- a/external/libnumbertext/ExternalProject_libnumbertext.mk
+++ b/external/libnumbertext/ExternalProject_libnumbertext.mk
@@ -16,9 +16,9 @@ $(eval $(call gb_ExternalProject_register_targets,libnumbertext,\
build \
))
-libnumbertext_CXXFLAGS=$(CXXFLAGS) $(CXXFLAGS_CXX11) $(gb_EMSCRIPTEN_CPPFLAGS)
+libnumbertext_CXXFLAGS=$(CXXFLAGS) $(CXXFLAGS_CXX11) $(gb_EMSCRIPTEN_CXXFLAGS)
-libnumbertext_CPPFLAGS+=$(gb_COMPILERDEFS_STDLIB_DEBUG)
+libnumbertext_CPPFLAGS+=$(gb_COMPILERDEFS_STDLIB_DEBUG) $(gb_EMSCRIPTEN_CPPFLAGS)
$(call gb_ExternalProject_get_state_target,libnumbertext,build):
$(call gb_Trace_StartRange,libnumbertext,EXTERNAL)