diff --git a/Makefile b/Makefile index ac738162f..2967195c3 100644 --- a/Makefile +++ b/Makefile @@ -160,15 +160,6 @@ endif #(ARM_ARCH_MAJOR) ################################################################################ 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 armclang,$(notdir $(CC))),) TF_CFLAGS_aarch32 := -target arm-arm-none-eabi @@ -232,8 +223,6 @@ endif #(AARCH32_INSTRUCTION_SET) TF_CFLAGS_aarch32 += -mno-unaligned-access TF_CFLAGS_aarch64 += -mgeneral-regs-only -mstrict-align -ASFLAGS += $(march-directive) - ############################################################################## # WARNINGS Configuration ############################################################################### @@ -691,6 +680,7 @@ endif include ${MAKE_HELPERS_DIRECTORY}march.mk TF_CFLAGS += $(march-directive) +ASFLAGS += $(march-directive) # 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 - diff --git a/make_helpers/march.mk b/make_helpers/march.mk index 2417709ca..1b73969a8 100644 --- a/make_helpers/march.mk +++ b/make_helpers/march.mk @@ -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 # @@ -82,4 +82,13 @@ endif # not clang 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