external/hunspell/ExternalProject_hunspell.mk | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
New commits: commit ccf5162e448b4dc6b930ce0354a60253ff70fbc2 Author: Luboš Luňák <[email protected]> AuthorDate: Wed Oct 13 01:41:33 2021 +0200 Commit: Luboš Luňák <[email protected]> CommitDate: Wed Oct 13 11:07:25 2021 +0200 use LTO to build hunspell if LTO is enabled Without this, LTO gcc build may fail while linking libmerged because of an undefined reference to `std::string::append(char const*)', which looks like a gcc bug because std::string should be a template, but whatever, this makes it build. Change-Id: I173cc0c773d5957a0c4a9cecc74c1ab33afad7db Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123541 Tested-by: Jenkins Reviewed-by: Luboš Luňák <[email protected]> diff --git a/external/hunspell/ExternalProject_hunspell.mk b/external/hunspell/ExternalProject_hunspell.mk index 91fd5c431ef8..51b693b06e08 100644 --- a/external/hunspell/ExternalProject_hunspell.mk +++ b/external/hunspell/ExternalProject_hunspell.mk @@ -21,6 +21,13 @@ hunspell_CPPFLAGS+=-D_GLIBCXX_DEBUG endif endif +hunspell_CXXFLAGS:=$(CXXFLAGS) $(gb_LTOFLAGS) \ + $(gb_EMSCRIPTEN_CPPFLAGS) \ + $(if $(ENABLE_OPTIMIZED),$(gb_COMPILEROPTFLAGS),$(gb_COMPILERNOOPTFLAGS)) \ + $(if $(debug),$(gb_DEBUGINFO_FLAGS)) + +hunspell_LDFLAGS:=$(gb_LTOFLAGS) + $(call gb_ExternalProject_get_state_target,hunspell,build): $(call gb_Trace_StartRange,hunspell,EXTERNAL) $(call gb_ExternalProject_run,build,\ @@ -28,7 +35,8 @@ $(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) $(gb_EMSCRIPTEN_CPPFLAGS) $(if $(ENABLE_OPTIMIZED),$(gb_COMPILEROPTFLAGS),$(gb_COMPILERNOOPTFLAGS)) $(if $(debug),$(gb_DEBUGINFO_FLAGS))" \ + $(if $(hunspell_CXXFLAGS),CXXFLAGS='$(hunspell_CXXFLAGS)') \ + $(if $(hunspell_LDFLAGS),LDFLAGS='$(hunspell_LDFLAGS)') \ && cd src/hunspell && $(MAKE) \ ) $(call gb_Trace_EndRange,hunspell,EXTERNAL)
