diff options
author | Daniel Schwierzeck <daniel.schwierzeck@gmail.com> | 2018-09-23 19:15:15 +0200 |
---|---|---|
committer | Daniel Schwierzeck <daniel.schwierzeck@gmail.com> | 2018-11-18 16:02:23 +0100 |
commit | 1d3b97c94eb562fa1071abd50b3a4cb4cca7f203 (patch) | |
tree | c7b24702fc3970326f1f012f3decf7f1f62fd50a /examples | |
parent | 101860ef69887f12cd5cc8d0e1512a37f4ffb8d7 (diff) |
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 <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Rick Chen <rick@andestech.com>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/standalone/Makefile | 4 |
1 files changed, 3 insertions, 1 deletions
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 |