diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-08-07 18:38:59 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-08-07 18:38:59 +0200 |
commit | b08553f0491e8f23ba890b206a4c9c5c9633b390 (patch) | |
tree | c0ea10a1d012c0b9f110e0f0e77719341f3fe1b4 /solenv | |
parent | f54f5dea9778bc4a3103fe97921c6e952c2d6c46 (diff) |
Under -fsanitize=undefined, always link with C++ compiler
Change-Id: I4ded563245dd6d491420a69903796d933cbd449c
Diffstat (limited to 'solenv')
-rw-r--r-- | solenv/gbuild/platform/unxgcc.mk | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk index 6d89207bf3ee..94526abcdeb4 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)) \ |