summaryrefslogtreecommitdiff
path: root/solenv/gbuild/platform/solaris.mk
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-08-11 20:26:56 +0200
committerStephan Bergmann <sbergman@redhat.com>2020-08-12 06:09:49 +0200
commita42eefab8629c998ec0f1351075888b95b039ec1 (patch)
treeacec91db57a20ef2606df20a0928f6ea5ce680e7 /solenv/gbuild/platform/solaris.mk
parent986bd8b93b35ad7f2760dfe0576860532daa0e42 (diff)
Enable --enable-lto --enable-skia when building with GCC+Clang on Linux
...where all the Library_skia objects are built with Clang, so contain intermediate LLVM bytecode, but were then linked via GCC and ld or gold, which do not understand such object files and thus failed. So in gb_LinkTarget__command_dynamiclink use T_CC/T_CXX also for the linker command line. But then Clang would still be used for linking with the -fuse-ld=(ld or gold) $(USE_LD) suitable for GCC, and would still fail. So break T_USE_LD out of T_LDFLAGS and let gb_LinkTarget_use_clang override T_USE_LD with CLANG_USE_LD. At least for now, that CLANG_USE_LD (containing something like -fuse-ld=lld or -fuse-ld=lld --ld-path=... for the latter see d668c9a04d04d256fcbbd2165fe226f1db88256b "Adapt --enable-ld to Clang 12 trunk --ld-path") needs to manually be passed into autogen.sh, it is not computed in configure.ac. Then building Library_skia would still fail to link against StaticLibrary_libpng, as that only contains intermediate GCC object code, so make sure to build it with -ffat-lto-objects in this specific case. Change-Id: I0a104e53a8898cd9c2eb3b643e21954e853608cc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100556 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'solenv/gbuild/platform/solaris.mk')
-rw-r--r--solenv/gbuild/platform/solaris.mk2
1 files changed, 1 insertions, 1 deletions
diff --git a/solenv/gbuild/platform/solaris.mk b/solenv/gbuild/platform/solaris.mk
index d1d068c8fd22..686b082a5cf5 100644
--- a/solenv/gbuild/platform/solaris.mk
+++ b/solenv/gbuild/platform/solaris.mk
@@ -116,7 +116,7 @@ $(call gb_Helper_abbreviate_dirs,\
$(if $(SOVERSIONSCRIPT),-Wl$(COMMA)-soname=$(notdir $(1)) \
) \
$(subst \d,$$,$(RPATH)) \
- $(T_LDFLAGS) \
+ $(T_USE_LD) $(T_LDFLAGS) \
$(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) \
$(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \
$(foreach object,$(ASMOBJECTS),$(call gb_AsmObject_get_target,$(object))) \