mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-16 17:44:19 +00:00
feat(st): support gcc as linker
One of the internal make rules for ST platforms uses the linker, but with dedicated options for ld. Adapt the rule to check if the linker is gcc and use updated options. Signed-off-by: Yann Gautier <yann.gautier@foss.st.com> Change-Id: If566dccfa329f9d34a80673a60c6fadd642a0231
This commit is contained in:
parent
cfe6767f7d
commit
7762531216
1 changed files with 4 additions and 0 deletions
|
@ -57,7 +57,11 @@ $(eval $(call MAKE_LD,${STM32_TF_LINKERFILE},$(STM32_LD_FILE),bl2))
|
|||
|
||||
tf-a-%.elf: $(PLAT)-%.o ${STM32_TF_LINKERFILE}
|
||||
@echo " LDS $<"
|
||||
ifneq ($(findstring gcc,$(notdir $(LD))),)
|
||||
${Q}${LD} -o $@ $(subst --,-Wl$(comma)--,${STM32_TF_ELF_LDFLAGS}) -nostartfiles -Wl,-Map=$(@:.elf=.map) -Wl,-dT ${STM32_TF_LINKERFILE} $<
|
||||
else
|
||||
${Q}${LD} -o $@ ${STM32_TF_ELF_LDFLAGS} -Map=$(@:.elf=.map) --script ${STM32_TF_LINKERFILE} $<
|
||||
endif
|
||||
|
||||
tf-a-%.bin: tf-a-%.elf
|
||||
${Q}${OC} -O binary $< $@
|
||||
|
|
Loading…
Add table
Reference in a new issue