link binary with extra options provided by app

A custom linker script might have references to files and defines
provided directly by the application, the EXTRA_LINKER_CMD_OPT
variable can be exported by the application with the needed
includes to satisfy the linking process.

Change-Id: Ic0b3dffa9a6c31fe8ef28f4f45c30266e7327e06
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Anas Nashif 2016-01-31 04:46:37 -05:00
commit 20fe678782

View file

@ -764,12 +764,12 @@ $(KERNEL_NAME).lnk:
linker.cmd: $(zephyr-deps) linker.cmd: $(zephyr-deps)
$(Q)$(CC) -x assembler-with-cpp -nostdinc -undef -E -P \ $(Q)$(CC) -x assembler-with-cpp -nostdinc -undef -E -P \
$(LDFLAG_LINKERCMD) $(LD_TOOLCHAIN) -I$(srctree)/include \ $(LDFLAG_LINKERCMD) $(LD_TOOLCHAIN) -I$(srctree)/include \
-I$(objtree)/include/generated $(KBUILD_LDS) -o $@ -I$(objtree)/include/generated $(EXTRA_LINKER_CMD_OPT) $(KBUILD_LDS) -o $@
final-linker.cmd: $(zephyr-deps) final-linker.cmd: $(zephyr-deps)
$(Q)$(CC) -x assembler-with-cpp -nostdinc -undef -E -P \ $(Q)$(CC) -x assembler-with-cpp -nostdinc -undef -E -P \
$(LDFLAG_LINKERCMD) $(LD_TOOLCHAIN) -DFINAL_LINK -I$(srctree)/include \ $(LDFLAG_LINKERCMD) $(LD_TOOLCHAIN) -DFINAL_LINK -I$(srctree)/include \
-I$(objtree)/include/generated $(KBUILD_LDS) -o $@ -I$(objtree)/include/generated $(EXTRA_LINKER_CMD_OPT) $(KBUILD_LDS) -o $@
TMP_ELF = .tmp_$(KERNEL_NAME).prebuilt TMP_ELF = .tmp_$(KERNEL_NAME).prebuilt