mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-16 09:34:18 +00:00
Merge changes from topic "gcc_linker_aarch32" into integration
* changes: feat(st): support gcc as linker fix(build): allow gcc linker on Aarch32 platforms
This commit is contained in:
commit
3018854b5f
2 changed files with 8 additions and 2 deletions
6
Makefile
6
Makefile
|
@ -370,8 +370,10 @@ else ifneq ($(findstring gcc,$(notdir $(LD))),)
|
|||
|
||||
# GCC automatically adds fix-cortex-a53-843419 flag when used to link
|
||||
# which breaks some builds, so disable if errata fix is not explicitly enabled
|
||||
ifneq (${ERRATA_A53_843419},1)
|
||||
TF_LDFLAGS += -mno-fix-cortex-a53-843419
|
||||
ifeq (${ARCH},aarch64)
|
||||
ifneq (${ERRATA_A53_843419},1)
|
||||
TF_LDFLAGS += -mno-fix-cortex-a53-843419
|
||||
endif
|
||||
endif
|
||||
TF_LDFLAGS += -nostdlib
|
||||
TF_LDFLAGS += $(subst --,-Xlinker --,$(TF_LDFLAGS_$(ARCH)))
|
||||
|
|
|
@ -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