From 1d3b97c94eb562fa1071abd50b3a4cb4cca7f203 Mon Sep 17 00:00:00 2001 From: Daniel Schwierzeck Date: Sun, 23 Sep 2018 19:15:15 +0200 Subject: Kbuild: add LDFLAGS_STANDALONE Introduce a new Makefile variable for passing LDFLAGS to standalone programs. Currently the variable CONFIG_STANDALONE_LOAD_ADDR is misued on some archs to pass a specific linker script. Signed-off-by: Daniel Schwierzeck Reviewed-by: Tom Rini Reviewed-by: Rick Chen --- examples/standalone/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'examples') diff --git a/examples/standalone/Makefile b/examples/standalone/Makefile index 09364d84a0..abe1bf1883 100644 --- a/examples/standalone/Makefile +++ b/examples/standalone/Makefile @@ -45,6 +45,8 @@ endif # source file. ccflags-y += $(call cc-option,-fno-toplevel-reorder) +LDFLAGS_STANDALONE += -Ttext $(CONFIG_STANDALONE_LOAD_ADDR) + ######################################################################### quiet_cmd_link_lib = LD $@ @@ -54,7 +56,7 @@ $(LIB): $(LIBOBJS) FORCE $(call if_changed,link_lib) quiet_cmd_link_elf = LD $@ - cmd_link_elf = $(LD) $(LDFLAGS) -g -Ttext $(CONFIG_STANDALONE_LOAD_ADDR) \ + cmd_link_elf = $(LD) $(LDFLAGS) $(LDFLAGS_STANDALONE) -g \ -o $@ -e $(SYM_PREFIX)$(@F) $< $(LIB) $(PLATFORM_LIBGCC) $(ELF): $(obj)/%: $(obj)/%.o $(LIB) FORCE -- cgit