diff options
author | Michael Stahl <mstahl@redhat.com> | 2013-09-19 18:05:02 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2013-09-22 11:08:33 +0200 |
commit | f861ae6acdbde8acc9560366d344852391d17b8d (patch) | |
tree | 871e6bac330452402d3be903528282fbc39fdc8e /solenv | |
parent | f2899508b3bd55ecdbd45a02e0e8071b95906b3a (diff) |
gbuild: change linking order on ELF platforms
If there are static libraries in $(LIBS) then things get really annoying
if they depend on other static libs that are StaticLibraries, e.g. orcus
and boost_system. So reorder this to include $(LIBS) in the --start-group
--end-group and hope that doesn't break anything.
Hopefully $(LIBS) does not need -Wl$(COMMA)--no-as-needed, that should
only be required for $(LINKEDLIBS).
Change-Id: Ie15239a0fb7b5295f85941150e2c60912be73bfb
Diffstat (limited to 'solenv')
-rw-r--r-- | solenv/gbuild/platform/solaris.mk | 7 | ||||
-rw-r--r-- | solenv/gbuild/platform/unxgcc.mk | 7 |
2 files changed, 10 insertions, 4 deletions
diff --git a/solenv/gbuild/platform/solaris.mk b/solenv/gbuild/platform/solaris.mk index 5ff75ae7c7eb..e68411606e85 100644 --- a/solenv/gbuild/platform/solaris.mk +++ b/solenv/gbuild/platform/solaris.mk @@ -182,9 +182,12 @@ $(call gb_Helper_abbreviate_dirs,\ $(foreach object,$(GENCOBJECTS),$(call gb_GenCObject_get_target,$(object))) \ $(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 \ + -Wl$(COMMA)--start-group \ $(LIBS) \ + $(foreach lib,$(LINKED_STATIC_LIBS),\ + $(call gb_StaticLibrary_get_target,$(lib))) \ + -Wl$(COMMA)--end-group \ + -Wl$(COMMA)--no-as-needed \ $(patsubst lib%.a,-l%,$(patsubst lib%.so,-l%,$(patsubst %.$(gb_Library_UDK_MAJORVER),%,$(foreach lib,$(LINKED_LIBS),$(call gb_Library_get_filename,$(lib)))))) \ -o $(1) \ $(if $(SOVERSIONSCRIPT),&& ln -sf ../../ure-link/lib/$(notdir $(1)) $(ILIBTARGET))) diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk index d8a690f16338..beb2567f9db5 100644 --- a/solenv/gbuild/platform/unxgcc.mk +++ b/solenv/gbuild/platform/unxgcc.mk @@ -184,9 +184,12 @@ $(call gb_Helper_abbreviate_dirs,\ $(foreach object,$(GENCOBJECTS),$(call gb_GenCObject_get_target,$(object))) \ $(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 \ + -Wl$(COMMA)--start-group \ $(LIBS) \ + $(foreach lib,$(LINKED_STATIC_LIBS),\ + $(call gb_StaticLibrary_get_target,$(lib))) \ + -Wl$(COMMA)--end-group \ + -Wl$(COMMA)--no-as-needed \ $(patsubst lib%.a,-l%,$(patsubst lib%.so,-l%,$(patsubst %.$(gb_Library_UDK_MAJORVER),%,$(foreach lib,$(LINKED_LIBS),$(call gb_Library_get_filename,$(lib)))))) \ -o $(1) \ $(if $(SOVERSIONSCRIPT),&& ln -sf ../../ure-link/lib/$(notdir $(1)) $(ILIBTARGET))) |