summaryrefslogtreecommitdiff
path: root/scripts/Makefile.lib
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/Makefile.lib')
-rw-r--r--scripts/Makefile.lib5
1 files changed, 2 insertions, 3 deletions
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 8c77eaaa4e..8decb0e451 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -161,7 +161,7 @@ a_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(UBOOTINCLUDE) \
cpp_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(UBOOTINCLUDE) \
$(__cpp_flags)
-ld_flags = $(LDFLAGS) $(ldflags-y)
+ld_flags = $(KBUILD_LDFLAGS) $(ldflags-y) $(LDFLAGS_$(@F))
# Try these files in order to find the U-Boot-specific .dtsi include file
u_boot_dtsi_options = $(strip $(wildcard $(dir $<)$(basename $(notdir $<))-u-boot.dtsi) \
@@ -256,8 +256,7 @@ $(obj)/%: $(src)/%_shipped
# ---------------------------------------------------------------------------
quiet_cmd_ld = LD $@
-cmd_ld = $(LD) $(LDFLAGS) $(ldflags-y) $(LDFLAGS_$(@F)) \
- $(filter-out FORCE,$^) -o $@
+cmd_ld = $(LD) $(ld_flags) $(filter-out FORCE,$^) -o $@
# Objcopy
# ---------------------------------------------------------------------------