[Libreoffice-commits] core.git: solenv/gbuild

Stephan Bergmann sbergman at redhat.com
Thu Aug 7 09:39:35 PDT 2014


 solenv/gbuild/platform/unxgcc.mk |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit b08553f0491e8f23ba890b206a4c9c5c9633b390
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Aug 7 18:38:59 2014 +0200

    Under -fsanitize=undefined, always link with C++ compiler
    
    Change-Id: I4ded563245dd6d491420a69903796d933cbd449c

diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk
index 6d89207..94526ab 100644
--- a/solenv/gbuild/platform/unxgcc.mk
+++ b/solenv/gbuild/platform/unxgcc.mk
@@ -158,9 +158,13 @@ endif
 # note that `cat $(extraobjectlist)` is needed to build with older gcc versions, e.g. 4.1.2 on SLED10
 # we want to use @$(extraobjectlist) in the long run
 # link with C compiler if there are no C++ files (pyuno_wrapper depends on this)
+# But always link with C++ compiler e.g. under -fsanitze=undefined, as sal uses
+# __ubsan_handle_dynamic_type_cache_miss_abort and __ubsan_vptr_type_cache from
+# libclang_rt.ubsan_cxx-x86_64.a, and oosplash links against sal but itself only
+# contains .c sources:
 define gb_LinkTarget__command_dynamiclink
 $(call gb_Helper_abbreviate_dirs,\
-	$(if $(CXXOBJECTS)$(GENCXXOBJECTS)$(EXTRAOBJECTLISTS),$(gb_CXX),$(gb_CC)) \
+	$(if $(CXXOBJECTS)$(GENCXXOBJECTS)$(EXTRAOBJECTLISTS)$(filter-out XTRUE,X$(ENABLE_RUNTIME_OPTIMIZATIONS)),$(gb_CXX),$(gb_CC)) \
 		$(if $(filter Library CppunitTest,$(TARGETTYPE)),$(gb_Library_TARGETTYPEFLAGS)) \
 		$(gb_LTOFLAGS) \
 		$(if $(SOVERSIONSCRIPT),-Wl$(COMMA)--soname=$(notdir $(1)) \


More information about the Libreoffice-commits mailing list