summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2013-07-01 13:27:54 +0200
committerMichael Stahl <mstahl@redhat.com>2013-07-01 13:28:42 +0200
commit99a4baf89c470d1e73b4e87fe9adf37a09230a2c (patch)
tree0c44e300b69ecb156683be167422062ce44ed150
parent53a08b03a88e7f6c387988c01f7c6e2183967176 (diff)
gbuild: sync solaris.mk linker invocation with unxgcc.mk
Change-Id: Ib7ef6fe87673c601ad3c24f3ed3f382c039551f4
-rw-r--r--solenv/gbuild/platform/solaris.mk15
1 files changed, 10 insertions, 5 deletions
diff --git a/solenv/gbuild/platform/solaris.mk b/solenv/gbuild/platform/solaris.mk
index 20fc2a98181b..240204c91e70 100644
--- a/solenv/gbuild/platform/solaris.mk
+++ b/solenv/gbuild/platform/solaris.mk
@@ -171,7 +171,9 @@ $(call gb_Helper_abbreviate_dirs,\
mkdir -p $(dir $(1)) && \
$(if $(CXXOBJECTS)$(GENCXXOBJECTS)$(EXTRAOBJECTLISTS),$(gb_CXX),$(gb_CC)) \
$(if $(filter Library CppunitTest,$(TARGETTYPE)),$(gb_Library_TARGETTYPEFLAGS)) \
- $(if $(filter Library,$(TARGETTYPE)),$(gb_Library_LTOFLAGS)) \
+ $(if $(filter-out $(foreach lib,frm scfilt wpftdraw,$(call gb_Library_get_linktargetname,$(lib))),$*),$(gb_LTOFLAGS)) \
+ $(if $(SOVERSION),-Wl$(COMMA)--soname=$(notdir $(1)).$(SOVERSION)) \
+ $(if $(SOVERSIONSCRIPT),-Wl$(COMMA)--version-script=$(SOVERSIONSCRIPT))\
$(subst \d,$$,$(RPATH)) \
$(T_LDFLAGS) \
$(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) \
@@ -181,13 +183,16 @@ $(call gb_Helper_abbreviate_dirs,\
$(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_target,$(object))) \
$(foreach extraobjectlist,$(EXTRAOBJECTLISTS),`cat $(extraobjectlist)`) \
-Wl$(COMMA)--start-group $(foreach lib,$(LINKED_STATIC_LIBS),$(call gb_StaticLibrary_get_target,$(lib))) -Wl$(COMMA)--end-group \
+ -Wl$(COMMA)--no-as-needed \
$(LIBS) \
$(patsubst lib%.a,-l%,$(patsubst lib%.so,-l%,$(foreach lib,$(LINKED_LIBS),$(call gb_Library_get_filename,$(lib))))) \
- -o $(1))
+ -o $(if $(SOVERSION),$(1).$(SOVERSION),$(1)))
+ $(if $(SOVERSION),ln -sf $(notdir $(1)).$(SOVERSION) $(1))
$(if $(filter Library,$(TARGETTYPE)),\
- $(NM) --extern-only --dynamic --format=posix $(1) \
- | cut -d' ' -f1-2 | grep -v U$$ \
- > $(1).exports.tmp && \
+ readelf -d $(1) | grep SONAME > $(1).exports.tmp ; \
+ $(NM) --dynamic --extern-only --defined-only --format=posix $(1) \
+ | cut -d' ' -f1-2 \
+ >> $(1).exports.tmp && \
if cmp -s $(1).exports.tmp $(1).exports; \
then rm $(1).exports.tmp; \
else mv $(1).exports.tmp $(1).exports; touch -r $(1) $(1).exports; \