diff options
author | Alexei Fedorov <Alexei.Fedorov@arm.com> | 2020-12-07 18:13:28 +0000 |
---|---|---|
committer | Alexei Fedorov <Alexei.Fedorov@arm.com> | 2020-12-10 08:56:45 +0000 |
commit | d92f4cef8c544ea1b3c8d48908ac1118930ed51c (patch) | |
tree | 27a7b8e578b1639ba96bc4ca19bc2175e41ccc95 /Makefile | |
parent | 23e031b4822ad96753e8bae8f8586f034e38a5ab (diff) | |
download | tf-a-tests-d92f4cef8c544ea1b3c8d48908ac1118930ed51c.tar.gz |
TFTF: Add build option for Arm Feature Modifiers
This patch adds a new ARM_ARCH_FEATURE build option
to add support for compiler's feature modifiers.
It has the form '[no]feature+...' and defaults to
'none'. This option translates into compiler option
'-march=armvX[.Y]-a+[no]feature+...'.
Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
Change-Id: I115a921c777b7932523d2dff8e8e03377d87bb78
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 22 |
1 files changed, 18 insertions, 4 deletions
@@ -180,13 +180,27 @@ endif # Set the compiler's target architecture profile based on ARM_ARCH_MINOR option ifeq (${ARM_ARCH_MINOR},0) -march32-directive = -march=armv8-a -march64-directive = -march=armv8-a +march32-directive = -march=armv${ARM_ARCH_MAJOR}-a +march64-directive = -march=armv${ARM_ARCH_MAJOR}-a else -march32-directive = -march=armv8.${ARM_ARCH_MINOR}-a -march64-directive = -march=armv8.${ARM_ARCH_MINOR}-a +march32-directive = -march=armv${ARM_ARCH_MAJOR}.${ARM_ARCH_MINOR}-a +march64-directive = -march=armv${ARM_ARCH_MAJOR}.${ARM_ARCH_MINOR}-a endif +# Get architecture feature modifiers +arch-features = ${ARM_ARCH_FEATURE} + +# Set the compiler's architecture feature modifiers +ifneq ($(arch-features), none) +ifeq ($(ARCH), aarch32) +march32-directive := $(march32-directive)+$(arch-features) +else +march64-directive := $(march64-directive)+$(arch-features) +endif +# Print features +$(info Arm Architecture Features specified: $(subst +, ,$(arch-features))) +endif # arch-features + COMMON_ASFLAGS_aarch64 := -mgeneral-regs-only ${march64-directive} COMMON_CFLAGS_aarch64 := -mgeneral-regs-only -mstrict-align ${march64-directive} |