diff options
author | Manish Pandey <manish.pandey2@arm.com> | 2020-12-11 17:19:27 +0000 |
---|---|---|
committer | TrustedFirmware Code Review <review@review.trustedfirmware.org> | 2020-12-11 17:19:27 +0000 |
commit | ca8f3a88cadf66331db97e17c10719c86def03b7 (patch) | |
tree | 27a7b8e578b1639ba96bc4ca19bc2175e41ccc95 | |
parent | 23e031b4822ad96753e8bae8f8586f034e38a5ab (diff) | |
parent | d92f4cef8c544ea1b3c8d48908ac1118930ed51c (diff) | |
download | tf-a-tests-ca8f3a88cadf66331db97e17c10719c86def03b7.tar.gz |
Merge "TFTF: Add build option for Arm Feature Modifiers"
-rw-r--r-- | Makefile | 22 | ||||
-rw-r--r-- | docs/getting_started/build-options.rst | 6 | ||||
-rw-r--r-- | make_helpers/defaults.mk | 3 |
3 files changed, 27 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} diff --git a/docs/getting_started/build-options.rst b/docs/getting_started/build-options.rst index 88154662e..d8ffe8b14 100644 --- a/docs/getting_started/build-options.rst +++ b/docs/getting_started/build-options.rst @@ -24,6 +24,12 @@ payload, whose simplistic build system is mostly independent. either ``aarch64`` or ``aarch32`` as values. By default, it is defined to ``aarch64``. Not all test images support this build option. +- ``ARM_ARCH_FEATURE``: Optional Arm Architecture build option which specifies + one or more feature modifiers. This option has the form ``[no]feature+...`` + and defaults to ``none``. It translates into compiler option + ``-march=armvX[.Y]-a+[no]feature+...``. See compiler's documentation for the + list of supported feature modifiers. + - ``ARM_ARCH_MAJOR``: The major version of Arm Architecture to target when compiling TF-A Tests. Its value must be numeric, and defaults to 8. diff --git a/make_helpers/defaults.mk b/make_helpers/defaults.mk index ca44b4753..2e18d67f7 100644 --- a/make_helpers/defaults.mk +++ b/make_helpers/defaults.mk @@ -13,6 +13,9 @@ # The Target build architecture. Supported values are: aarch64, aarch32. ARCH := aarch64 +# ARM Architecture feature modifiers: none by default +ARM_ARCH_FEATURE := none + # ARM Architecture major and minor versions: 8.0 by default. ARM_ARCH_MAJOR := 8 ARM_ARCH_MINOR := 0 |