aboutsummaryrefslogtreecommitdiff
path: root/mk/libraries.mk
diff options
context:
space:
mode:
Diffstat (limited to 'mk/libraries.mk')
-rw-r--r--mk/libraries.mk5
1 files changed, 4 insertions, 1 deletions
diff --git a/mk/libraries.mk b/mk/libraries.mk
index 6541775f3..02e4d47f9 100644
--- a/mk/libraries.mk
+++ b/mk/libraries.mk
@@ -67,6 +67,7 @@ define build-library
$(1)_LDFLAGS_USE :=
$(1)_LDFLAGS_USE_INSTALLED :=
+ $(1)_LIB_CLOSURE := $(1)
$$(eval $$(call create-dir, $$(_d)))
@@ -128,10 +129,12 @@ define build-library
+$$(trace-ld) $(LD) -Ur -o $$(_d)/$$($(1)_NAME).o $$^
$$(trace-ar) $(AR) crs $$@ $$(_d)/$$($(1)_NAME).o
- $(1)_LDFLAGS_USE += $$($(1)_PATH) $$($(1)_LDFLAGS)
+ $(1)_LDFLAGS_USE += $$($(1)_PATH) $$($(1)_LDFLAGS) $$(foreach lib, $$($(1)_LIBS), $$($$(lib)_LDFLAGS_USE))
$(1)_INSTALL_PATH := $$(libdir)/$$($(1)_NAME).a
+ $(1)_LIB_CLOSURE += $$($(1)_LIBS)
+
endif
$(1)_LDFLAGS_USE += $$($(1)_LDFLAGS_PROPAGATED)