summaryrefslogtreecommitdiff
path: root/external/libwps
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-05-07 19:18:02 +0200
committerStephan Bergmann <sbergman@redhat.com>2018-05-07 19:18:02 +0200
commit603074c5f2b84de8a24593faf807da784b040625 (patch)
tree5b68a5889d81f7c0c91b89fac47e6138fff82a19 /external/libwps
parentcd1a3eb429c58e79bf427d3cbc0f74b44020d4ca (diff)
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
Diffstat (limited to 'external/libwps')
-rw-r--r--external/libwps/ExternalProject_libwps.mk7
1 files changed, 7 insertions, 0 deletions
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')) \