build: use toolchain identifiers in conditions

The toolchain refactor change introduces the `${toolchain}-${tool}-id`
variables, which provide identifiers for all of the toolchain tools used
by the build system. This change replaces the various conditions that
are in use to identify these tools based on the path with a standard set
of comparisons against these new identifier variables.

Change-Id: Ib60e592359fa6e415c19a012e68d660f87436ca7
Signed-off-by: Chris Kay <chris.kay@arm.com>
This commit is contained in:
Chris Kay 2023-12-04 09:55:50 +00:00
parent ffb7742125
commit 8620bd0b93
18 changed files with 48 additions and 48 deletions

View file

@ -144,8 +144,8 @@ endif #(ARM_ARCH_MAJOR)
################################################################################ ################################################################################
arch-features = ${ARM_ARCH_FEATURE} arch-features = ${ARM_ARCH_FEATURE}
ifneq ($(findstring clang,$(notdir $($(ARCH)-cc))),) ifneq ($(filter %-clang,$($(ARCH)-cc-id)),)
ifneq ($(findstring armclang,$(notdir $($(ARCH)-cc))),) ifeq ($($(ARCH)-cc-id),arm-clang)
TF_CFLAGS_aarch32 := -target arm-arm-none-eabi TF_CFLAGS_aarch32 := -target arm-arm-none-eabi
TF_CFLAGS_aarch64 := -target aarch64-arm-none-eabi TF_CFLAGS_aarch64 := -target aarch64-arm-none-eabi
else else
@ -153,7 +153,7 @@ ifneq ($(findstring clang,$(notdir $($(ARCH)-cc))),)
TF_CFLAGS_aarch64 := -target aarch64-elf TF_CFLAGS_aarch64 := -target aarch64-elf
endif endif
else ifneq ($(findstring gcc,$(notdir $($(ARCH)-cc))),) else ifeq ($($(ARCH)-cc-id),gnu-gcc)
ifeq ($(ENABLE_LTO),1) ifeq ($(ENABLE_LTO),1)
# Enable LTO only for aarch64 # Enable LTO only for aarch64
ifeq (${ARCH},aarch64) ifeq (${ARCH},aarch64)
@ -256,7 +256,7 @@ else ifeq (${W},3)
endif #(W) endif #(W)
# Compiler specific warnings # Compiler specific warnings
ifeq ($(findstring clang,$(notdir $($(ARCH)-cc))),) ifeq ($(filter %-clang,$($(ARCH)-cc-id)),)
# not using clang # not using clang
WARNINGS += -Wunused-but-set-variable -Wmaybe-uninitialized \ WARNINGS += -Wunused-but-set-variable -Wmaybe-uninitialized \
-Wpacked-bitfield-compat -Wshift-overflow=2 \ -Wpacked-bitfield-compat -Wshift-overflow=2 \
@ -305,13 +305,13 @@ GCC_V_OUTPUT := $(shell $($(ARCH)-cc) -v 2>&1)
TF_LDFLAGS += -z noexecstack TF_LDFLAGS += -z noexecstack
# LD = armlink # LD = armlink
ifneq ($(findstring armlink,$(notdir $($(ARCH)-ld))),) ifeq ($($(ARCH)-ld-id),arm-link)
TF_LDFLAGS += --diag_error=warning --lto_level=O1 TF_LDFLAGS += --diag_error=warning --lto_level=O1
TF_LDFLAGS += --remove --info=unused,unusedsymbols TF_LDFLAGS += --remove --info=unused,unusedsymbols
TF_LDFLAGS += $(TF_LDFLAGS_$(ARCH)) TF_LDFLAGS += $(TF_LDFLAGS_$(ARCH))
# LD = gcc (used when GCC LTO is enabled) # LD = gcc (used when GCC LTO is enabled)
else ifneq ($(findstring gcc,$(notdir $($(ARCH)-ld))),) else ifeq ($($(ARCH)-ld-id),gnu-gcc)
# Pass ld options with Wl or Xlinker switches # Pass ld options with Wl or Xlinker switches
TF_LDFLAGS += $(call ld_option,-Xlinker --no-warn-rwx-segments) TF_LDFLAGS += $(call ld_option,-Xlinker --no-warn-rwx-segments)
TF_LDFLAGS += -Wl,--fatal-warnings -O1 TF_LDFLAGS += -Wl,--fatal-warnings -O1
@ -353,7 +353,7 @@ else
# therefore don't add those in that case. # therefore don't add those in that case.
# ld.lld reports section type mismatch warnings, # ld.lld reports section type mismatch warnings,
# therefore don't add --fatal-warnings to it. # therefore don't add --fatal-warnings to it.
ifeq ($(findstring ld.lld,$(notdir $($(ARCH)-ld))),) ifneq ($($(ARCH)-ld-id),llvm-lld)
TF_LDFLAGS += $(TF_LDFLAGS_$(ARCH)) --fatal-warnings TF_LDFLAGS += $(TF_LDFLAGS_$(ARCH)) --fatal-warnings
endif endif
@ -385,7 +385,7 @@ BL_COMMON_SOURCES += common/bl_common.c \
plat/common/${ARCH}/platform_helpers.S \ plat/common/${ARCH}/platform_helpers.S \
${COMPILER_RT_SRCS} ${COMPILER_RT_SRCS}
ifeq ($(notdir $($(ARCH)-cc)),armclang) ifeq ($($(ARCH)-cc-id),arm-clang)
BL_COMMON_SOURCES += lib/${ARCH}/armclang_printf.S BL_COMMON_SOURCES += lib/${ARCH}/armclang_printf.S
endif endif
@ -566,14 +566,14 @@ include ${MAKE_HELPERS_DIRECTORY}arch_features.mk
ifeq (${SUPPORT_STACK_MEMTAG},yes) ifeq (${SUPPORT_STACK_MEMTAG},yes)
ifdef mem_tag_arch_support ifdef mem_tag_arch_support
# Check for armclang and clang compilers # Check for armclang and clang compilers
ifneq ( ,$(filter $(notdir $($(ARCH)-cc)),armclang clang)) ifneq ($(filter %-clang,$($(ARCH)-cc-id)),)
# Add "memtag" architecture feature modifier if not specified # Add "memtag" architecture feature modifier if not specified
ifeq ( ,$(findstring memtag,$(arch-features))) ifeq ( ,$(findstring memtag,$(arch-features)))
arch-features := $(arch-features)+memtag arch-features := $(arch-features)+memtag
endif # memtag endif # memtag
ifeq ($(notdir $($(ARCH)-cc)),armclang) ifeq ($($(ARCH)-cc-id),arm-clang)
TF_CFLAGS += -mmemtag-stack TF_CFLAGS += -mmemtag-stack
else ifeq ($(notdir $($(ARCH)-cc)),clang) else ifeq ($($(ARCH)-cc-id),llvm-clang)
TF_CFLAGS += -fsanitize=memtag TF_CFLAGS += -fsanitize=memtag
endif # armclang endif # armclang
endif endif
@ -687,12 +687,12 @@ endif
PIE_FOUND := $(findstring --enable-default-pie,${GCC_V_OUTPUT}) PIE_FOUND := $(findstring --enable-default-pie,${GCC_V_OUTPUT})
ifneq ($(PIE_FOUND),) ifneq ($(PIE_FOUND),)
TF_CFLAGS += -fno-PIE TF_CFLAGS += -fno-PIE
ifneq ($(findstring gcc,$(notdir $($(ARCH)-ld))),) ifeq ($($(ARCH)-ld-id),gnu-gcc)
TF_LDFLAGS += -no-pie TF_LDFLAGS += -no-pie
endif endif
endif #(PIE_FOUND) endif #(PIE_FOUND)
ifneq ($(findstring gcc,$(notdir $($(ARCH)-ld))),) ifeq ($($(ARCH)-ld-id),gnu-gcc)
PIE_LDFLAGS += -Wl,-pie -Wl,--no-dynamic-linker PIE_LDFLAGS += -Wl,-pie -Wl,--no-dynamic-linker
else else
PIE_LDFLAGS += -pie --no-dynamic-linker PIE_LDFLAGS += -pie --no-dynamic-linker
@ -1417,7 +1417,7 @@ ifeq (${DYN_DISABLE_AUTH},1)
$(eval $(call add_define,DYN_DISABLE_AUTH)) $(eval $(call add_define,DYN_DISABLE_AUTH))
endif endif
ifneq ($(findstring armlink,$(notdir $($(ARCH)-ld))),) ifeq ($($(ARCH)-ld-id),arm-link)
$(eval $(call add_define,USE_ARM_LINK)) $(eval $(call add_define,USE_ARM_LINK))
endif endif
@ -1449,7 +1449,7 @@ msg_start:
ifeq (${ERROR_DEPRECATED},0) ifeq (${ERROR_DEPRECATED},0)
# Check if deprecated declarations and cpp warnings should be treated as error or not. # Check if deprecated declarations and cpp warnings should be treated as error or not.
ifneq ($(findstring clang,$(notdir $($(ARCH)-cc))),) ifneq ($(filter %-clang,$($(ARCH)-cc-id)),)
CPPFLAGS += -Wno-error=deprecated-declarations CPPFLAGS += -Wno-error=deprecated-declarations
else else
CPPFLAGS += -Wno-error=deprecated-declarations -Wno-error=cpp CPPFLAGS += -Wno-error=deprecated-declarations -Wno-error=cpp

View file

@ -29,9 +29,9 @@ ifeq (${ENABLE_PMF},1)
BL1_SOURCES += lib/pmf/pmf_main.c BL1_SOURCES += lib/pmf/pmf_main.c
endif endif
ifneq ($(findstring gcc,$(notdir $($(ARCH)-ld))),) ifeq ($($(ARCH)-ld-id),gnu-gcc)
BL1_LDFLAGS += -Wl,--sort-section=alignment BL1_LDFLAGS += -Wl,--sort-section=alignment
else ifneq ($(findstring ld,$(notdir $($(ARCH)-ld))),) else ifneq ($(filter llvm-lld gnu-ld,$($(ARCH)-ld-id)),)
BL1_LDFLAGS += --sort-section=alignment BL1_LDFLAGS += --sort-section=alignment
endif endif

View file

@ -15,9 +15,9 @@ ifeq (${ARCH},aarch64)
BL2_SOURCES += common/aarch64/early_exceptions.S BL2_SOURCES += common/aarch64/early_exceptions.S
endif endif
ifneq ($(findstring gcc,$(notdir $($(ARCH)-ld))),) ifeq ($($(ARCH)-ld-id),gnu-gcc)
BL2_LDFLAGS += -Wl,--sort-section=alignment BL2_LDFLAGS += -Wl,--sort-section=alignment
else ifneq ($(findstring ld,$(notdir $($(ARCH)-ld))),) else ifneq ($(filter llvm-lld gnu-ld,$($(ARCH)-ld-id)),)
BL2_LDFLAGS += --sort-section=alignment BL2_LDFLAGS += --sort-section=alignment
endif endif

View file

@ -14,8 +14,8 @@ endif
BL2U_DEFAULT_LINKER_SCRIPT_SOURCE := bl2u/bl2u.ld.S BL2U_DEFAULT_LINKER_SCRIPT_SOURCE := bl2u/bl2u.ld.S
ifneq ($(findstring gcc,$(notdir $($(ARCH)-ld))),) ifeq ($($(ARCH)-ld-id),gnu-gcc)
BL2U_LDFLAGS += -Wl,--sort-section=alignment BL2U_LDFLAGS += -Wl,--sort-section=alignment
else ifneq ($(findstring ld,$(notdir $($(ARCH)-ld))),) else ifneq ($(filter llvm-lld gnu-ld,$($(ARCH)-ld-id)),)
BL2U_LDFLAGS += --sort-section=alignment BL2U_LDFLAGS += --sort-section=alignment
endif endif

View file

@ -167,9 +167,9 @@ endif
BL31_DEFAULT_LINKER_SCRIPT_SOURCE := bl31/bl31.ld.S BL31_DEFAULT_LINKER_SCRIPT_SOURCE := bl31/bl31.ld.S
ifneq ($(findstring gcc,$(notdir $($(ARCH)-ld))),) ifeq ($($(ARCH)-ld-id),gnu-gcc)
BL31_LDFLAGS += -Wl,--sort-section=alignment BL31_LDFLAGS += -Wl,--sort-section=alignment
else ifneq ($(findstring ld,$(notdir $($(ARCH)-ld))),) else ifneq ($(filter llvm-lld gnu-ld,$($(ARCH)-ld-id)),)
BL31_LDFLAGS += --sort-section=alignment BL31_LDFLAGS += --sort-section=alignment
endif endif

View file

@ -57,9 +57,9 @@ endif
BL32_DEFAULT_LINKER_SCRIPT_SOURCE := bl32/sp_min/sp_min.ld.S BL32_DEFAULT_LINKER_SCRIPT_SOURCE := bl32/sp_min/sp_min.ld.S
ifneq ($(findstring gcc,$(notdir $($(ARCH)-ld))),) ifeq ($($(ARCH)-ld-id),gnu-gcc)
BL32_LDFLAGS += -Wl,--sort-section=alignment BL32_LDFLAGS += -Wl,--sort-section=alignment
else ifneq ($(findstring ld,$(notdir $($(ARCH)-ld))),) else ifneq ($(filter llvm-lld gnu-ld,$($(ARCH)-ld-id)),)
BL32_LDFLAGS += --sort-section=alignment BL32_LDFLAGS += --sort-section=alignment
endif endif

View file

@ -24,9 +24,9 @@ BL32_SOURCES += bl32/tsp/aarch64/tsp_entrypoint.S \
BL32_DEFAULT_LINKER_SCRIPT_SOURCE := bl32/tsp/tsp.ld.S BL32_DEFAULT_LINKER_SCRIPT_SOURCE := bl32/tsp/tsp.ld.S
ifneq ($(findstring gcc,$(notdir $($(ARCH)-ld))),) ifeq ($($(ARCH)-ld-id),gnu-gcc)
BL32_LDFLAGS += -Wl,--sort-section=alignment BL32_LDFLAGS += -Wl,--sort-section=alignment
else ifneq ($(findstring ld,$(notdir $($(ARCH)-ld))),) else ifneq ($(filter llvm-lld gnu-ld,$($(ARCH)-ld-id)),)
BL32_LDFLAGS += --sort-section=alignment BL32_LDFLAGS += --sort-section=alignment
endif endif

View file

@ -477,7 +477,7 @@ $(eval $(call MAKE_LIB_OBJS,$(BUILD_DIR),$(SOURCES),$(1)))
.PHONY : lib${1}_dirs .PHONY : lib${1}_dirs
lib${1}_dirs: | ${BUILD_DIR} ${LIB_DIR} ${ROMLIB_DIR} ${LIBWRAPPER_DIR} lib${1}_dirs: | ${BUILD_DIR} ${LIB_DIR} ${ROMLIB_DIR} ${LIBWRAPPER_DIR}
libraries: ${LIB_DIR}/lib$(1).a libraries: ${LIB_DIR}/lib$(1).a
ifneq ($(findstring armlink,$(notdir $(LD))),) ifeq ($($(ARCH)-ld-id),arm-link)
LDPATHS = --userlibpath=${LIB_DIR} LDPATHS = --userlibpath=${LIB_DIR}
LDLIBS += --library=$(1) LDLIBS += --library=$(1)
else else
@ -575,14 +575,14 @@ else
const char version[] = "${VERSION}";' | \ const char version[] = "${VERSION}";' | \
$($(ARCH)-cc) $$(TF_CFLAGS) $$(CFLAGS) -xc -c - -o $(BUILD_DIR)/build_message.o $($(ARCH)-cc) $$(TF_CFLAGS) $$(CFLAGS) -xc -c - -o $(BUILD_DIR)/build_message.o
endif endif
ifneq ($(findstring armlink,$(notdir $(LD))),) ifeq ($($(ARCH)-ld-id),arm-link)
$$(Q)$($(ARCH)-ld) -o $$@ $$(TF_LDFLAGS) $$(LDFLAGS) $(BL_LDFLAGS) --entry=${1}_entrypoint \ $$(Q)$($(ARCH)-ld) -o $$@ $$(TF_LDFLAGS) $$(LDFLAGS) $(BL_LDFLAGS) --entry=${1}_entrypoint \
--predefine="-D__LINKER__=$(__LINKER__)" \ --predefine="-D__LINKER__=$(__LINKER__)" \
--predefine="-DTF_CFLAGS=$(TF_CFLAGS)" \ --predefine="-DTF_CFLAGS=$(TF_CFLAGS)" \
--map --list="$(MAPFILE)" --scatter=${PLAT_DIR}/scat/${1}.scat \ --map --list="$(MAPFILE)" --scatter=${PLAT_DIR}/scat/${1}.scat \
$(LDPATHS) $(LIBWRAPPER) $(LDLIBS) $(BL_LIBS) \ $(LDPATHS) $(LIBWRAPPER) $(LDLIBS) $(BL_LIBS) \
$(BUILD_DIR)/build_message.o $(OBJS) $(BUILD_DIR)/build_message.o $(OBJS)
else ifneq ($(findstring gcc,$(notdir $(LD))),) else ifeq ($($(ARCH)-ld-id),gnu-gcc)
$$(Q)$($(ARCH)-ld) -o $$@ $$(TF_LDFLAGS) $$(LDFLAGS) $(BL_LDFLAGS) -Wl,-Map=$(MAPFILE) \ $$(Q)$($(ARCH)-ld) -o $$@ $$(TF_LDFLAGS) $$(LDFLAGS) $(BL_LDFLAGS) -Wl,-Map=$(MAPFILE) \
$(addprefix -Wl$(comma)--script$(comma),$(LINKER_SCRIPTS)) -Wl,--script,$(DEFAULT_LINKER_SCRIPT) \ $(addprefix -Wl$(comma)--script$(comma),$(LINKER_SCRIPTS)) -Wl,--script,$(DEFAULT_LINKER_SCRIPT) \
$(BUILD_DIR)/build_message.o \ $(BUILD_DIR)/build_message.o \

View file

@ -54,7 +54,7 @@ else
provided-march = armv${ARM_ARCH_MAJOR}.${ARM_ARCH_MINOR}-a provided-march = armv${ARM_ARCH_MAJOR}.${ARM_ARCH_MINOR}-a
endif endif
ifeq ($(findstring clang,$(notdir $($(ARCH)-cc))),) ifeq ($(filter %-clang,$($(ARCH)-cc-id)),)
# We expect from Platform to provide a correct Major/Minor value but expecting something # We expect from Platform to provide a correct Major/Minor value but expecting something
# from compiler with unsupported march means we shouldn't fail without trying anything, # from compiler with unsupported march means we shouldn't fail without trying anything,

View file

@ -41,9 +41,9 @@ BL31_SOURCES += lib/cpus/aarch64/cortex_a53.S \
${GIC_SOURCES} ${GIC_SOURCES}
# Tune compiler for Cortex-A53 # Tune compiler for Cortex-A53
ifeq ($(notdir $($(ARCH)-cc)),armclang) ifeq ($($(ARCH)-cc-id),arm-clang)
TF_CFLAGS_aarch64 += -mcpu=cortex-a53 TF_CFLAGS_aarch64 += -mcpu=cortex-a53
else ifneq ($(findstring clang,$(notdir $($(ARCH)-cc))),) else ifneq ($(filter %-clang,$($(ARCH)-cc-id)),)
TF_CFLAGS_aarch64 += -mcpu=cortex-a53 TF_CFLAGS_aarch64 += -mcpu=cortex-a53
else else
TF_CFLAGS_aarch64 += -mtune=cortex-a53 TF_CFLAGS_aarch64 += -mtune=cortex-a53

View file

@ -41,9 +41,9 @@ BL31_SOURCES += lib/cpus/aarch64/cortex_a53.S \
${GIC_SOURCES} ${GIC_SOURCES}
# Tune compiler for Cortex-A53 # Tune compiler for Cortex-A53
ifeq ($(notdir $($(ARCH)-cc)),armclang) ifeq ($($(ARCH)-cc-id),arm-clang)
TF_CFLAGS_aarch64 += -mcpu=cortex-a53 TF_CFLAGS_aarch64 += -mcpu=cortex-a53
else ifneq ($(findstring clang,$(notdir $($(ARCH)-cc))),) else ifneq ($(filter %-clang,$($(ARCH)-cc-id)),)
TF_CFLAGS_aarch64 += -mcpu=cortex-a53 TF_CFLAGS_aarch64 += -mcpu=cortex-a53
else else
TF_CFLAGS_aarch64 += -mtune=cortex-a53 TF_CFLAGS_aarch64 += -mtune=cortex-a53

View file

@ -37,9 +37,9 @@ BL31_SOURCES += lib/cpus/aarch64/cortex_a53.S \
${GIC_SOURCES} ${GIC_SOURCES}
# Tune compiler for Cortex-A53 # Tune compiler for Cortex-A53
ifeq ($(notdir $($(ARCH)-cc)),armclang) ifeq ($($(ARCH)-cc-id),arm-clang)
TF_CFLAGS_aarch64 += -mcpu=cortex-a53 TF_CFLAGS_aarch64 += -mcpu=cortex-a53
else ifneq ($(findstring clang,$(notdir $($(ARCH)-cc))),) else ifneq ($(filter %-clang,$($(ARCH)-cc-id)),)
TF_CFLAGS_aarch64 += -mcpu=cortex-a53 TF_CFLAGS_aarch64 += -mcpu=cortex-a53
else else
TF_CFLAGS_aarch64 += -mtune=cortex-a53 TF_CFLAGS_aarch64 += -mtune=cortex-a53

View file

@ -41,9 +41,9 @@ BL31_SOURCES += lib/cpus/aarch64/cortex_a53.S \
${GIC_SOURCES} ${GIC_SOURCES}
# Tune compiler for Cortex-A53 # Tune compiler for Cortex-A53
ifeq ($(notdir $($(ARCH)-cc)),armclang) ifeq ($($(ARCH)-cc-id),arm-clang)
TF_CFLAGS_aarch64 += -mcpu=cortex-a53 TF_CFLAGS_aarch64 += -mcpu=cortex-a53
else ifneq ($(findstring clang,$(notdir $($(ARCH)-cc))),) else ifneq ($(filter %-clang,$($(ARCH)-cc-id)),)
TF_CFLAGS_aarch64 += -mcpu=cortex-a53 TF_CFLAGS_aarch64 += -mcpu=cortex-a53
else else
TF_CFLAGS_aarch64 += -mtune=cortex-a53 TF_CFLAGS_aarch64 += -mtune=cortex-a53

View file

@ -82,7 +82,7 @@ override LIBC_SRCS := $(addprefix lib/libc/, \
INCLUDES += -Iinclude/lib/libc \ INCLUDES += -Iinclude/lib/libc \
-Iinclude/lib/libc/$(ARCH) \ -Iinclude/lib/libc/$(ARCH) \
ifneq ($(findstring armlink,$(notdir $($(ARCH)-ld))),) ifeq ($($(ARCH)-ld-id),arm-link)
# o suppress warnings for section mismatches, undefined symbols # o suppress warnings for section mismatches, undefined symbols
# o use only those libraries that are specified in the input file # o use only those libraries that are specified in the input file
# list to resolve references # list to resolve references

View file

@ -52,9 +52,9 @@ BL31_SOURCES += lib/cpus/aarch64/cortex_a53.S \
${LIBFDT_SRCS} ${LIBFDT_SRCS}
# Tune compiler for Cortex-A53 # Tune compiler for Cortex-A53
ifeq ($(notdir $($(ARCH)-cc)),armclang) ifeq ($($(ARCH)-cc-id),arm-clang)
TF_CFLAGS_aarch64 += -mcpu=cortex-a53 TF_CFLAGS_aarch64 += -mcpu=cortex-a53
else ifneq ($(findstring clang,$(notdir $($(ARCH)-cc))),) else ifneq ($(filter %-clang,$($(ARCH)-cc-id)),)
TF_CFLAGS_aarch64 += -mcpu=cortex-a53 TF_CFLAGS_aarch64 += -mcpu=cortex-a53
else else
TF_CFLAGS_aarch64 += -mtune=cortex-a53 TF_CFLAGS_aarch64 += -mtune=cortex-a53

View file

@ -39,9 +39,9 @@ RESET_TO_BL31 := 1
COLD_BOOT_SINGLE_CPU := 0 COLD_BOOT_SINGLE_CPU := 0
# Tune compiler for Cortex-A72 # Tune compiler for Cortex-A72
ifeq ($(notdir $($(ARCH)-cc)),armclang) ifeq ($($(ARCH)-cc-id),arm-clang)
TF_CFLAGS_aarch64 += -mcpu=cortex-a72 TF_CFLAGS_aarch64 += -mcpu=cortex-a72
else ifneq ($(findstring clang,$(notdir $($(ARCH)-cc))),) else ifneq ($(filter %-clang,$($(ARCH)-cc-id)),)
TF_CFLAGS_aarch64 += -mcpu=cortex-a72 TF_CFLAGS_aarch64 += -mcpu=cortex-a72
else else
TF_CFLAGS_aarch64 += -mtune=cortex-a72 TF_CFLAGS_aarch64 += -mtune=cortex-a72

View file

@ -57,7 +57,7 @@ $(eval $(call MAKE_LD,${STM32_TF_LINKERFILE},$(STM32_LD_FILE),bl2))
tf-a-%.elf: $(PLAT)-%.o ${STM32_TF_LINKERFILE} tf-a-%.elf: $(PLAT)-%.o ${STM32_TF_LINKERFILE}
@echo " LDS $<" @echo " LDS $<"
ifneq ($(findstring gcc,$(notdir $($(ARCH)-ld))),) ifeq ($($(ARCH)-ld-id),gnu-gcc)
${Q}$($(ARCH)-ld) -o $@ $(subst --,-Wl$(comma)--,${STM32_TF_ELF_LDFLAGS}) -nostartfiles -Wl,-Map=$(@:.elf=.map) -Wl,-dT ${STM32_TF_LINKERFILE} $< ${Q}$($(ARCH)-ld) -o $@ $(subst --,-Wl$(comma)--,${STM32_TF_ELF_LDFLAGS}) -nostartfiles -Wl,-Map=$(@:.elf=.map) -Wl,-dT ${STM32_TF_LINKERFILE} $<
else else
${Q}$($(ARCH)-ld) -o $@ ${STM32_TF_ELF_LDFLAGS} -Map=$(@:.elf=.map) --script ${STM32_TF_LINKERFILE} $< ${Q}$($(ARCH)-ld) -o $@ ${STM32_TF_ELF_LDFLAGS} -Map=$(@:.elf=.map) --script ${STM32_TF_LINKERFILE} $<

View file

@ -10,9 +10,9 @@ RMM_SOURCES += services/std_svc/rmmd/trp/trp_entry.S \
RMM_DEFAULT_LINKER_SCRIPT_SOURCE := services/std_svc/rmmd/trp/linker.ld.S RMM_DEFAULT_LINKER_SCRIPT_SOURCE := services/std_svc/rmmd/trp/linker.ld.S
ifneq ($(findstring gcc,$(notdir $($(ARCH)-ld))),) ifeq ($($(ARCH)-ld-id),gnu-gcc)
RMM_LDFLAGS += -Wl,--sort-section=alignment RMM_LDFLAGS += -Wl,--sort-section=alignment
else ifneq ($(findstring ld,$(notdir $($(ARCH)-ld))),) else ifneq ($(filter llvm-lld gnu-ld,$($(ARCH)-ld-id)),)
RMM_LDFLAGS += --sort-section=alignment RMM_LDFLAGS += --sort-section=alignment
endif endif