mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-18 02:24:18 +00:00
fix(build): march handling with arch-features
Currently all march compiler option handling is moved to build utility in march.mk. We pass arch-features to build which appends to march options, so this should be done once we decide march options and moving it to march.mk file. Change-Id: Ifaf99af5f371fd28db376a12657ccf4f363295c2 Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
This commit is contained in:
parent
2a71f1633c
commit
7275ac2af8
2 changed files with 11 additions and 12 deletions
12
Makefile
12
Makefile
|
@ -160,15 +160,6 @@ endif #(ARM_ARCH_MAJOR)
|
||||||
################################################################################
|
################################################################################
|
||||||
arch-features = ${ARM_ARCH_FEATURE}
|
arch-features = ${ARM_ARCH_FEATURE}
|
||||||
|
|
||||||
# Set the compiler's architecture feature modifiers
|
|
||||||
ifneq ($(arch-features), none)
|
|
||||||
# Strip "none+" from arch-features
|
|
||||||
arch-features := $(subst none+,,$(arch-features))
|
|
||||||
march-directive := $(march-directive)+$(arch-features)
|
|
||||||
# Print features
|
|
||||||
$(info Arm Architecture Features specified: $(subst +, ,$(arch-features)))
|
|
||||||
endif #(arch-features)
|
|
||||||
|
|
||||||
ifneq ($(findstring clang,$(notdir $(CC))),)
|
ifneq ($(findstring clang,$(notdir $(CC))),)
|
||||||
ifneq ($(findstring armclang,$(notdir $(CC))),)
|
ifneq ($(findstring armclang,$(notdir $(CC))),)
|
||||||
TF_CFLAGS_aarch32 := -target arm-arm-none-eabi
|
TF_CFLAGS_aarch32 := -target arm-arm-none-eabi
|
||||||
|
@ -232,8 +223,6 @@ endif #(AARCH32_INSTRUCTION_SET)
|
||||||
TF_CFLAGS_aarch32 += -mno-unaligned-access
|
TF_CFLAGS_aarch32 += -mno-unaligned-access
|
||||||
TF_CFLAGS_aarch64 += -mgeneral-regs-only -mstrict-align
|
TF_CFLAGS_aarch64 += -mgeneral-regs-only -mstrict-align
|
||||||
|
|
||||||
ASFLAGS += $(march-directive)
|
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
# WARNINGS Configuration
|
# WARNINGS Configuration
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
@ -691,6 +680,7 @@ endif
|
||||||
include ${MAKE_HELPERS_DIRECTORY}march.mk
|
include ${MAKE_HELPERS_DIRECTORY}march.mk
|
||||||
|
|
||||||
TF_CFLAGS += $(march-directive)
|
TF_CFLAGS += $(march-directive)
|
||||||
|
ASFLAGS += $(march-directive)
|
||||||
|
|
||||||
# This internal flag is common option which is set to 1 for scenarios
|
# This internal flag is common option which is set to 1 for scenarios
|
||||||
# when the BL2 is running in EL3 level. This occurs in two scenarios -
|
# when the BL2 is running in EL3 level. This occurs in two scenarios -
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright (c) 2023, Arm Limited. All rights reserved.
|
# Copyright (c) 2023-2024, Arm Limited. All rights reserved.
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: BSD-3-Clause
|
# SPDX-License-Identifier: BSD-3-Clause
|
||||||
#
|
#
|
||||||
|
@ -82,4 +82,13 @@ endif # not clang
|
||||||
|
|
||||||
march-directive := -march=${provided-march}
|
march-directive := -march=${provided-march}
|
||||||
|
|
||||||
|
# Set the compiler's architecture feature modifiers
|
||||||
|
ifneq ($(arch-features), none)
|
||||||
|
# Strip "none+" from arch-features
|
||||||
|
arch-features := $(subst none+,,$(arch-features))
|
||||||
|
march-directive := $(march-directive)+$(arch-features)
|
||||||
|
# Print features
|
||||||
|
$(info Arm Architecture Features specified: $(subst +, ,$(arch-features)))
|
||||||
|
endif #(arch-features)
|
||||||
|
|
||||||
endif # MARCH_DIRECTIVE
|
endif # MARCH_DIRECTIVE
|
||||||
|
|
Loading…
Add table
Reference in a new issue