diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2021-01-26 14:47:11 +0100 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2021-04-09 12:21:17 +0200 |
commit | 6176e007c4ff94da477854426a20f5237228283a (patch) | |
tree | 21f7a365194e9001fbe2c26f20d283d17a9c9dc4 | |
parent | catchall (diff) | |
download | core-6176e007c4ff94da477854426a20f5237228283a.tar.gz core-6176e007c4ff94da477854426a20f5237228283a.zip |
catchall
Change-Id: I94dbe94eed80bfb82a404db83249572caed7f715
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | external/hunspell/ExternalProject_hunspell.mk | 2 | ||||
-rw-r--r-- | sc/source/core/tool/math.cxx | 5 | ||||
-rw-r--r-- | solenv/gbuild/Executable.mk | 4 | ||||
-rw-r--r-- | solenv/gbuild/LinkTarget.mk | 5 | ||||
-rw-r--r-- | solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk | 30 | ||||
-rw-r--r-- | vcl/Module_vcl.mk | 10 |
7 files changed, 43 insertions, 15 deletions
diff --git a/configure.ac b/configure.ac index 5fbbbe0d26d0..adffb1efc630 100644 --- a/configure.ac +++ b/configure.ac @@ -4242,7 +4242,7 @@ fi # =================================================================== HAVE_GCC_GGDB2= -if test "$GCC" = "yes"; then +if test "$GCC" = "yes" -a "$_os" != "Emscripten"; then AC_MSG_CHECKING([whether $CC_BASE supports -ggdb2]) save_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -Werror -ggdb2" diff --git a/external/hunspell/ExternalProject_hunspell.mk b/external/hunspell/ExternalProject_hunspell.mk index 09a0680367fb..91fd5c431ef8 100644 --- a/external/hunspell/ExternalProject_hunspell.mk +++ b/external/hunspell/ExternalProject_hunspell.mk @@ -28,7 +28,7 @@ $(call gb_ExternalProject_get_state_target,hunspell,build): $(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM))\ $(if $(filter AIX,$(OS)),CFLAGS="-D_LINUX_SOURCE_COMPAT") \ $(if $(hunspell_CPPFLAGS),CPPFLAGS='$(hunspell_CPPFLAGS)') \ - CXXFLAGS="$(CXXFLAGS) $(if $(ENABLE_OPTIMIZED),$(gb_COMPILEROPTFLAGS),$(gb_COMPILERNOOPTFLAGS)) $(if $(debug),$(gb_DEBUGINFO_FLAGS))" \ + CXXFLAGS="$(CXXFLAGS) $(gb_EMSCRIPTEN_CPPFLAGS) $(if $(ENABLE_OPTIMIZED),$(gb_COMPILEROPTFLAGS),$(gb_COMPILERNOOPTFLAGS)) $(if $(debug),$(gb_DEBUGINFO_FLAGS))" \ && cd src/hunspell && $(MAKE) \ ) $(call gb_Trace_EndRange,hunspell,EXTERNAL) diff --git a/sc/source/core/tool/math.cxx b/sc/source/core/tool/math.cxx index a077d5c3521a..3c496f83833c 100644 --- a/sc/source/core/tool/math.cxx +++ b/sc/source/core/tool/math.cxx @@ -53,8 +53,13 @@ double power(const double& fVal1, const double& fVal2) } // The pow() call must had been the most recent call to check errno or exception. if ((((math_errhandling & MATH_ERRNO) != 0) && (errno == EDOM || errno == ERANGE)) +// emscripten is currently broken by https://github.com/emscripten-core/emscripten/pull/11087 +// While the removal is correct for C99, it's not for C++11 (see http://www.cplusplus.com/reference/cfenv/FE_INEXACT/) +// But since emscripten currently doesn't support any math exceptions, we simply ignore them +#ifndef __EMSCRIPTEN__ || (((math_errhandling & MATH_ERREXCEPT) != 0) && std::fetestexcept(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW)) +#endif || !std::isfinite(fPow)) { fPow = CreateDoubleError(FormulaError::IllegalFPOperation); diff --git a/solenv/gbuild/Executable.mk b/solenv/gbuild/Executable.mk index 66b44e156904..72378956794e 100644 --- a/solenv/gbuild/Executable.mk +++ b/solenv/gbuild/Executable.mk @@ -47,8 +47,7 @@ $(call gb_Executable_get_runtime_target,%) : $(call gb_Executable_get_clean_target,%) : $(call gb_Helper_abbreviate_dirs,\ rm -f $(call gb_Executable_get_target,$*) \ - $(call gb_Executable_get_runtime_target,$*) \ - $(AUXTARGETS)) + $(call gb_Executable_get_runtime_target,$*)) gb_Executable__get_dir_for_layer = $(patsubst $(1):%,%,$(filter $(1):%,$(call gb_Executable_LAYER_DIRS))) gb_Executable__get_dir_for_layer_for_build = $(patsubst $(1):%,%,$(filter $(1):%,$(call gb_Executable_LAYER_DIRS_FOR_BUILD))) @@ -73,7 +72,6 @@ $(call gb_LinkTarget_add_libs,$(2),$(gb_STDLIBS)) $(call gb_Executable_get_runtime_target,$(1)) :| $(dir $(call gb_Executable_get_runtime_target,$(1))).dir $(call gb_Executable_get_runtime_target,$(1)) : $(call gb_Executable_get_target_for_build,$(1)) $(call gb_Executable_get_clean_target,$(1)) : $(call gb_LinkTarget_get_clean_target,$(2)) -$(call gb_Executable_get_clean_target,$(1)) : AUXTARGETS := $(call gb_Executable_Executable_platform,$(1),$(2),$(gb_Executable_BINDIR)/$(1).lib) $$(eval $$(call gb_Module_register_target,$(call gb_Executable_get_target,$(1)),$(call gb_Executable_get_clean_target,$(1)))) diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk index df5bb9a39834..eab38bd528a4 100644 --- a/solenv/gbuild/LinkTarget.mk +++ b/solenv/gbuild/LinkTarget.mk @@ -50,11 +50,16 @@ $(if $(ENABLE_OPTIMIZED_DEBUG),$(gb_COMPILERDEBUGOPTFLAGS), \ $(gb_COMPILERNOOPTFLAGS))) \ $(if $(call gb_LinkTarget__symbols_enabled,$(1)),$(gb_DEBUGINFO_FLAGS)) +# T_LDFLAGS is just expanded once. Override the flags here, so that the linker and compiler use the same. +ifeq (EMSCRIPTEN,$(OS)) +gb_LinkTarget__get_debugldflags=$(call gb_LinkTarget__get_debugflags,$1) +else # similar for LDFLAGS, use linker optimization flags in non-debug case, # but moreover strip debug from libraries for which debuginfo is not wanted # (some libraries reuse .o files from other libraries, notably unittests) gb_LinkTarget__get_stripldflags=$(if $(strip $(CFLAGS)$(CXXFLAGS)$(OBJCFLAGS)$(OBJCXXFLAGS)$(LDFLAGS)),,$(gb_LINKERSTRIPDEBUGFLAGS)) gb_LinkTarget__get_debugldflags=$(if $(call gb_LinkTarget__symbols_enabled,$(1)),$(gb_LINKER_DEBUGINFO_FLAGS),$(gb_LINKEROPTFLAGS) $(call gb_LinkTarget__get_stripldflags,$(1))) +endif # generic cflags/cxxflags to use (optimization flags, debug flags) # user supplied CFLAGS/CXXFLAGS override default debug/optimization flags diff --git a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk index 8642c4469afe..0831846c3392 100644 --- a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk +++ b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk @@ -22,19 +22,33 @@ gb_EMSCRIPTEN_EXCEPT := -s DISABLE_EXCEPTION_CATCHING=0 gb_LinkTarget_CFLAGS += $(gb_EMSCRIPTEN_CPPFLAGS) $(gb_EMSCRIPTEN_QTDEFS) gb_LinkTarget_CXXFLAGS += $(gb_EMSCRIPTEN_CPPFLAGS) $(gb_EMSCRIPTEN_QTDEFS) $(gb_EMSCRIPTEN_EXCEPT) +gb_LinkTarget_LDFLAGS += $(gb_EMSCRIPTEN_LDFLAGS) $(gb_EMSCRIPTEN_CPPFLAGS) $(gb_EMSCRIPTEN_EXCEPT) -# WASM is also optimized at link time, but ignores linker flags, so wants $(gb_COMPILEROPTFLAGS) -#gb_LINKEROPTFLAGS := +# Linker and compiler optimize + debug flags are handled in LinkTarget.mk +gb_LINKEROPTFLAGS := gb_LINKERSTRIPDEBUGFLAGS := +gb_DEBUGINFO_FLAGS = -g -gb_LinkTarget_LDFLAGS += $(gb_EMSCRIPTEN_LDFLAGS) $(gb_EMSCRIPTEN_CPPFLAGS) $(gb_EMSCRIPTEN_EXCEPT) -gb_LinkTarget_LDFLAGS += $(if $(ENABLE_OPTIMIZED),$(gb_COMPILEROPTFLAGS), \ - $(if $(ENABLE_OPTIMIZED_DEBUG),$(gb_COMPILERDEBUGOPTFLAGS),$(gb_COMPILERNOOPTFLAGS))) +gb_SUPPRESS_TESTS := $(true) -#gb_COMPILEROPTFLAGS := -O0 -g -#gb_LinkTarget_LDFLAGS += $(gb_EMSCRIPTEN_LDFLAGS) $(gb_EMSCRIPTEN_CPPFLAGS) $(gb_EMSCRIPTEN_EXCEPT) $(gb_COMPILEROPTFLAGS) +# cleanup addition JS and wasm files for binaries +define gb_Executable_Executable_platform +$(call gb_LinkTarget_add_auxtargets,$(2),\ + $(patsubst %.lib,%.wasm,$(3)) \ + $(patsubst %.lib,%.js,$(3)) \ + $(patsubst %.lib,%.worker.js,$(3)) \ +) -gb_SUPPRESS_TESTS := $(true) +endef + +define gb_CppunitTest_CppunitTest_platform +$(call gb_LinkTarget_add_auxtargets,$(2),\ + $(patsubst %.lib,%.wasm,$(3)) \ + $(patsubst %.lib,%.js,$(3)) \ + $(patsubst %.lib,%.worker.js,$(3)) \ +) + +endef define gb_Library_get_rpath endef diff --git a/vcl/Module_vcl.mk b/vcl/Module_vcl.mk index 3cf84ac21210..fc38ed5b481a 100644 --- a/vcl/Module_vcl.mk +++ b/vcl/Module_vcl.mk @@ -31,13 +31,19 @@ $(eval $(call gb_Module_add_targets,vcl,\ Package_skia_denylist ) \ $(if $(filter DESKTOP,$(BUILD_TYPE))$(filter EMSCRIPTEN,$(OS)), \ StaticLibrary_vclmain \ + $(if $(ENABLE_MACOSX_SANDBOX),, \ + $(if $(DISABLE_GUI),, \ + Executable_ui-previewer)) \ $(if $(filter EMSCRIPTEN LINUX MACOSX SOLARIS WNT %BSD,$(OS)), \ $(if $(DISABLE_GUI),, \ - Executable_vcldemo ))) \ + Executable_vcldemo \ + Executable_icontest \ + Executable_visualbackendtest \ + Executable_mtfdemo ))) \ )) $(eval $(call gb_Module_add_targets,vcl,\ - $(if $(filter-out EMSCRIPTEN ANDROID iOS WNT,$(OS)), \ + $(if $(filter-out ANDROID iOS WNT,$(OS)), \ Executable_svdemo \ Executable_fftester \ Executable_svptest \ |