summaryrefslogtreecommitdiff
path: root/solenv/gbuild/LinkTarget.mk
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2012-09-28 16:29:24 +0200
committerMichael Stahl <mstahl@redhat.com>2012-09-28 16:49:08 +0200
commit5032dc0fc339ba6b200e80a5482cc86e00662a0b (patch)
tree6ecb751f6fd25a7ee5f66434b10928423d1e05f7 /solenv/gbuild/LinkTarget.mk
parent7312f5ceacd44c9980b9262e403d4d9ac10f1aa9 (diff)
gbuild: invert handling of standard system libraries:
Always link in gb_STDLIBS, except when the library explicitly opts out with gb_LinkTarget_disable_standard_system_libs. Change-Id: I489a99114fbfa46d0421a27cf6c7b899dc268a4a
Diffstat (limited to 'solenv/gbuild/LinkTarget.mk')
-rw-r--r--solenv/gbuild/LinkTarget.mk10
1 files changed, 5 insertions, 5 deletions
diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk
index 5b953005ef24..617fc562bb2e 100644
--- a/solenv/gbuild/LinkTarget.mk
+++ b/solenv/gbuild/LinkTarget.mk
@@ -648,11 +648,11 @@ define gb_LinkTarget_add_libs
$(call gb_LinkTarget_get_target,$(1)) : LIBS += $(2)
endef
-# add platform specific standard libraries to linker command for linktarget $(1)
-# there are currently 94 Libraries/Executables/CppunitTests not using
-# gb_STDLIBS... probably this should need to be added explicitly
-define gb_LinkTarget_add_standard_system_libs
-$(call gb_LinkTarget_get_target,$(1)) : LIBS += $(gb_STDLIBS)
+# remove platform specific standard libraries for linktarget $(1)
+# assumption is that adding these standard libs is always useful, but in very
+# exceptional cases this disable method may be used
+define gb_LinkTarget_disable_standard_system_libs
+$(call gb_LinkTarget_get_target,$(1)) : LIBS := $$(filter-out $$(gb_STDLIBS),$$(LIBS))
endef
define gb_LinkTarget_add_api