arm-trusted-firmware/make_helpers
Govindraj Raja 7794d6c8f8 feat(build): march option selection
Current build infra uses ARM_ARCH_MAJOR/MINOR to come up with march
version and uses that march version with the compiler.

However in certain situations this is not ideal, like for example when
we build with gcc-11 which supports only till march=armv8.5 but
we need to build for 8.8 build, this means we need to bump down
MAJOR/MINOR and we can't rely on major and minor values from the
platform to select march value and build infra doesn't even try
to compile and fails with not supported MAJOR/MINOR.

By adding a march build helper we try to check if compiler supports
given march value from MAJOR/MINOR values from platform, if compiler
doesn't support then we try to check what's the max or best supported
march version by compiler and choose that march value and try to
compile with that.

This is a supportive mechanism which will decouple march reliance on
MAJOR/MINOR values from platform and will pave way for setting up
enabling of features based on MAJOR/MINOR without worrying about the
compiler not supporting given MAJOR/MINOR.

Also in TF-A we use generic instructions without much reliance or need
for exact march necessity. So enabling and building features from
armv-8.8 using an armv-8.5 march value is still going to be fine.

Please note: Platforms are free to freeze their march values using
`MARCH_DIRECTIVE`. In absence of this define we are going to poke
the compiler and come up with a potential march value.

Change-Id: I673061a269ec9018ff12e75dc375979f5e33b7d1
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
2023-07-03 14:24:40 -05:00
..
tbbr feat(build): pass CCA NV ctr option to cert_create 2023-05-25 16:40:43 -05:00
arch_features.mk refactor(ras): replace RAS_EXTENSION with FEAT_RAS 2023-05-09 13:19:22 +01:00
armv7-a-cpus.mk refactor(build): merge march32/64 directives 2023-06-22 16:37:03 -05:00
build_env.mk Use SPDX license identifiers 2017-05-03 09:39:28 +01:00
build_macros.mk Merge changes from topic "assert_boolean_set" into integration 2023-05-09 11:26:11 +02:00
cygwin.mk Use SPDX license identifiers 2017-05-03 09:39:28 +01:00
defaults.mk Merge changes from topic "mp/feat_ras" into integration 2023-05-09 21:48:45 +02:00
march.mk feat(build): march option selection 2023-07-03 14:24:40 -05:00
msys.mk Use SPDX license identifiers 2017-05-03 09:39:28 +01:00
plat_helpers.mk Change PLATFORM_ROOT to TF_PLATFORM_ROOT 2018-03-05 14:18:04 +08:00
unix.mk Makefile: Fix verbose builds on Windows 2018-10-19 15:54:27 +01:00
windows.mk build: fix syntax error in semantic ver generation 2022-08-23 16:51:13 +01:00