summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
Diffstat (limited to 'solenv')
-rw-r--r--solenv/gbuild/CppunitTest.mk3
-rw-r--r--solenv/gbuild/Executable.mk3
-rw-r--r--solenv/gbuild/Library.mk3
-rw-r--r--solenv/gbuild/LinkTarget.mk10
4 files changed, 11 insertions, 8 deletions
diff --git a/solenv/gbuild/CppunitTest.mk b/solenv/gbuild/CppunitTest.mk
index c7c7861275e4..5d0788aab372 100644
--- a/solenv/gbuild/CppunitTest.mk
+++ b/solenv/gbuild/CppunitTest.mk
@@ -104,6 +104,7 @@ endef
define gb_CppunitTest__CppunitTest_impl
$(call gb_LinkTarget_LinkTarget,$(2))
$(call gb_LinkTarget_set_targettype,$(2),CppunitTest)
+$(call gb_LinkTarget_add_libs,$(2),$(gb_STDLIBS))
$(call gb_LinkTarget_add_defs,$(2),\
$(gb_CppunitTest_DEFS) \
)
@@ -341,7 +342,7 @@ $(eval $(foreach method,\
add_ldflags \
set_ldflags \
add_libs \
- add_standard_system_libs \
+ disable_standard_system_libs \
use_system_darwin_frameworks \
use_system_win32_libs \
use_sdk_api \
diff --git a/solenv/gbuild/Executable.mk b/solenv/gbuild/Executable.mk
index 0288c1755f71..8c178175ad4f 100644
--- a/solenv/gbuild/Executable.mk
+++ b/solenv/gbuild/Executable.mk
@@ -54,6 +54,7 @@ endef
define gb_Executable__Executable_impl
$(call gb_LinkTarget_LinkTarget,$(2))
$(call gb_LinkTarget_set_targettype,$(2),Executable)
+$(call gb_LinkTarget_add_libs,$(2),$(gb_STDLIBS))
$(call gb_Executable_get_target,$(1)) : $(call gb_LinkTarget_get_target,$(2)) \
| $(dir $(call gb_Executable_get_target,$(1))).dir
$(call gb_Executable_get_clean_target,$(1)) : $(call gb_LinkTarget_get_clean_target,$(2))
@@ -105,7 +106,7 @@ $(eval $(foreach method,\
add_ldflags \
set_ldflags \
add_libs \
- add_standard_system_libs \
+ disable_standard_system_libs \
use_system_darwin_frameworks \
use_system_win32_libs \
set_library_path_flags \
diff --git a/solenv/gbuild/Library.mk b/solenv/gbuild/Library.mk
index e4003a9d2682..518211152cda 100644
--- a/solenv/gbuild/Library.mk
+++ b/solenv/gbuild/Library.mk
@@ -69,6 +69,7 @@ endef
define gb_Library__Library_impl
$(call gb_LinkTarget_LinkTarget,$(2))
$(call gb_LinkTarget_set_targettype,$(2),Library)
+$(call gb_LinkTarget_add_libs,$(2),$(gb_STDLIBS))
$(call gb_LinkTarget_add_defs,$(2),\
$(gb_Library_DEFS) \
)
@@ -185,7 +186,7 @@ $(eval $(foreach method,\
set_ldflags \
set_x64 \
add_libs \
- add_standard_system_libs \
+ disable_standard_system_libs \
use_system_darwin_frameworks \
use_system_win32_libs \
set_library_path_flags \
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