summaryrefslogtreecommitdiffstats
path: root/scripts/lib/devtool/export.py
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2025-07-24 10:06:00 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-08-04 18:04:03 +0100
commit754345d6063c51eef56ffb6db3135a4f68e6ed2d (patch)
tree0c06daf7bfde60da9bc97ac9186322041d47da41 /scripts/lib/devtool/export.py
parent9b68f9606179bdbff544fef6dc3475a56d56b336 (diff)
downloadpoky-754345d6063c51eef56ffb6db3135a4f68e6ed2d.tar.gz
feature-arm-crypto: Add +nocrypto to -mcpu when crypto not in features
When crypto is not in tune features then add +nocryto to -mcpu explicitly. This makes the behavior between clang and gcc match. Currently -mcpu=cortex-a72 has different behavior in clang and gcc in terms of what features are considered default. Clang enables different set of common features than gcc on other hand. For example clang enables crypto with default set but gcc does not, gcc recommends to disable unavailable extensions in -mcpu [1] explicitly. crypto is optional on cortex-a53 and cortex-a72. This is not as common but Broadcom SOCs in raspberrypi3/4 have dropped crypto for cost reasons [2]. This results in illegal instruction traps [3] [4] when building components e.g. chromium, qtwebengine, weston etc. with clang using -mcpu=cortex-a72 for rpi4 target. Adding +nocrypto makes clang behave like gcc does today. We do have separate tune if crypto enabled cortex-a72 cores are to be targeted (cortexa72-cryto) as DEFAULTTUNE They are added to default feature file since crypto extension is available in multiple arm architecture versions e.g. armv8, armv9. It is optional extension as per spec [5] Extensions can be enabled and disabled with -mcpu using the same syntax as with -march, and have same effect thats why it is intrumented via TUNE_CCARGS_MARCH_OPTS [1] https://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html#index-mcpu-2 [2] https://forums.raspberrypi.com/viewtopic.php?f=63&t=207888#p1332960 [3] https://github.com/llvm/llvm-project/issues/85699 [4] https://github.com/llvm/llvm-project/issues/90365 [5] https://developer.arm.com/documentation/109697/2025_06/Feature-descriptions/The-Armv9-0-architecture-extension (From OE-Core rev: db1b355b2b15ba57bd89c2dfb88c2c667551863e) Signed-off-by: Khem Raj <raj.khem@gmail.com> Cc: Quentin Schulz <quentin.schulz@cherry.de> Acked-by: Quentin Schulz <quentin.schulz@cherry.de> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/devtool/export.py')
0 files changed, 0 insertions, 0 deletions