[Libreoffice-commits] core.git: external/libwps
Stephan Bergmann
sbergman at redhat.com
Mon May 7 17:28:15 UTC 2018
external/libwps/ExternalProject_libwps.mk | 7 +++++++
1 file changed, 7 insertions(+)
New commits:
commit 603074c5f2b84de8a24593faf807da784b040625
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Mon May 7 19:18:02 2018 +0200
Pass _GLIBCXX_DEBUG into external/libwps
Otherwise, CppunitTest_sw_odfexport (which happens to load both libwps and
libnumbertext) on Linux --enable-dbgutil would cause a crash when
testSpellOutNumberingTypes calls into libnumbertext's use of std::regexp, which
instantiates a std::__detail::_NFA<...> with std::__debug::vector<...> members,
but happens to bind to libwps' (exported, inline) functions to destroy that
_NFA again, and libwps' view of std::__detail::_NFA<...> uses non-debug plain
std::vector<...> members.
(Copy/pastes the code to enable _GBLICXX_DEBUG as already used in various other
external/ExternalProject_*.mk, incl. ExternalProject_libnumbertext.mk. This
mess should be cleaned up.)
(It looks like a libstdc++ bug to me that such instances of _NFA with different
members due to debug mode nevertheless have the same mangled names.)
Change-Id: I92a41a39c5fe6ae5eb71855e32d929690219f1d1
diff --git a/external/libwps/ExternalProject_libwps.mk b/external/libwps/ExternalProject_libwps.mk
index 1acb12958e43..2a2d713ba013 100644
--- a/external/libwps/ExternalProject_libwps.mk
+++ b/external/libwps/ExternalProject_libwps.mk
@@ -19,6 +19,12 @@ $(eval $(call gb_ExternalProject_use_externals,libwps,\
revenge \
))
+ifneq (,$(filter ANDROID DRAGONFLY FREEBSD IOS LINUX NETBSD OPENBSD,$(OS)))
+ifneq (,$(gb_ENABLE_DBGUTIL))
+libwps_CPPFLAGS+=-D_GLIBCXX_DEBUG
+endif
+endif
+
$(call gb_ExternalProject_get_state_target,libwps,build) :
$(call gb_ExternalProject_run,build,\
export PKG_CONFIG="" \
@@ -36,6 +42,7 @@ $(call gb_ExternalProject_get_state_target,libwps,build) :
--disable-werror \
$(if $(verbose),--disable-silent-rules,--enable-silent-rules) \
CXXFLAGS="$(gb_CXXFLAGS) $(if $(ENABLE_OPTIMIZED),$(gb_COMPILEROPTFLAGS),$(gb_COMPILERNOOPTFLAGS))" \
+ $(if $(libwps_CPPFLAGS),CPPFLAGS='$(libwps_CPPFLAGS)') \
$(if $(filter LINUX,$(OS)),$(if $(SYSTEM_REVENGE),, \
'LDFLAGS=-Wl$(COMMA)-z$(COMMA)origin \
-Wl$(COMMA)-rpath$(COMMA)\$$$$ORIGIN')) \
More information about the Libreoffice-commits
mailing list