From 8ae969451d3850a500baf6c5710340258679cb9d Mon Sep 17 00:00:00 2001 From: Victor Campos Date: Tue, 10 Dec 2024 15:57:46 +0000 Subject: [PATCH 1/2] Enable exceptions and RTTI in the build of aarch64 nofp variants supposed to have them --- .../json/variants/aarch64a_be_soft_nofp_exn_rtti.json | 4 ++-- arm-multilib/json/variants/aarch64a_soft_nofp_exn_rtti.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arm-multilib/json/variants/aarch64a_be_soft_nofp_exn_rtti.json b/arm-multilib/json/variants/aarch64a_be_soft_nofp_exn_rtti.json index b1acc211..f4fc47d0 100644 --- a/arm-multilib/json/variants/aarch64a_be_soft_nofp_exn_rtti.json +++ b/arm-multilib/json/variants/aarch64a_be_soft_nofp_exn_rtti.json @@ -4,8 +4,8 @@ "TARGET_ARCH": "aarch64a", "VARIANT": "aarch64a_be_soft_nofp_exn_rtti", "COMPILE_FLAGS": "-march=armv8-a+nofp+nosimd -mbig-endian -mabi=aapcs-soft -mno-unaligned-access", - "ENABLE_EXCEPTIONS": "OFF", - "ENABLE_RTTI": "OFF", + "ENABLE_EXCEPTIONS": "ON", + "ENABLE_RTTI": "ON", "TEST_EXECUTOR": "fvp", "FVP_MODEL": "aem-a", "FVP_CONFIG": "v8a-aarch64 big-endian", diff --git a/arm-multilib/json/variants/aarch64a_soft_nofp_exn_rtti.json b/arm-multilib/json/variants/aarch64a_soft_nofp_exn_rtti.json index 52781406..90e703e6 100644 --- a/arm-multilib/json/variants/aarch64a_soft_nofp_exn_rtti.json +++ b/arm-multilib/json/variants/aarch64a_soft_nofp_exn_rtti.json @@ -4,8 +4,8 @@ "TARGET_ARCH": "aarch64a", "VARIANT": "aarch64a_soft_nofp_exn_rtti", "COMPILE_FLAGS": "-march=armv8-a+nofp+nosimd -mabi=aapcs-soft -mno-unaligned-access", - "ENABLE_EXCEPTIONS": "OFF", - "ENABLE_RTTI": "OFF", + "ENABLE_EXCEPTIONS": "ON", + "ENABLE_RTTI": "ON", "TEST_EXECUTOR": "qemu", "QEMU_MACHINE": "virt", "QEMU_CPU": "cortex-a57", From 80feca59266c33e2b2d67be0caa4636e399e4364 Mon Sep 17 00:00:00 2001 From: Victor Campos Date: Tue, 10 Dec 2024 16:42:21 +0000 Subject: [PATCH 2/2] aarch64 nofp variants without exceptions and RTTI must have higher priority The presence of `-fno-exceptions` and `-fno-rtti` in the driver invocation causes matching with two variants: the one with RTTI/Exceptions and the one without. In the multilib system, the last match is the one that wins, therefore in the JSON file we must list the variant without RTTI/Exceptions *after* the one with. --- arm-multilib/json/multilib.json | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/arm-multilib/json/multilib.json b/arm-multilib/json/multilib.json index 4101e3e1..87fde0e0 100644 --- a/arm-multilib/json/multilib.json +++ b/arm-multilib/json/multilib.json @@ -30,31 +30,30 @@ "json": "aarch64a_strictalign.json", "flags": "--target=aarch64-unknown-none-elf -mno-unaligned-access -fno-exceptions -fno-rtti" }, - { - "variant": "aarch64a_soft_nofp", - "json": "aarch64a_soft_nofp.json", - "flags": "--target=aarch64-unknown-none-elf -march=armv8-a+nofp+nosimd -mabi=aapcs-soft -fno-exceptions -fno-rtti", - "libraries_supported": "picolibc,newlib" - }, - { - "variant": "aarch64a_be_soft_nofp", - "json": "aarch64a_be_soft_nofp.json", - "flags": "--target=aarch64_be-unknown-none-elf -march=armv8-a+nofp+nosimd -mabi=aapcs-soft -fno-exceptions -fno-rtti", - "libraries_supported": "picolibc,newlib" - }, { "variant": "aarch64a_soft_nofp_exn_rtti", "json": "aarch64a_soft_nofp_exn_rtti.json", "flags": "--target=aarch64-unknown-none-elf -march=armv8-a+nofp+nosimd -mabi=aapcs-soft", "libraries_supported": "picolibc,newlib" }, + { + "variant": "aarch64a_soft_nofp", + "json": "aarch64a_soft_nofp.json", + "flags": "--target=aarch64-unknown-none-elf -march=armv8-a+nofp+nosimd -mabi=aapcs-soft -fno-exceptions -fno-rtti", + "libraries_supported": "picolibc,newlib" + }, { "variant": "aarch64a_be_soft_nofp_exn_rtti", "json": "aarch64a_be_soft_nofp_exn_rtti.json", "flags": "--target=aarch64_be-unknown-none-elf -march=armv8-a+nofp+nosimd -mabi=aapcs-soft", "libraries_supported": "picolibc,newlib" }, - + { + "variant": "aarch64a_be_soft_nofp", + "json": "aarch64a_be_soft_nofp.json", + "flags": "--target=aarch64_be-unknown-none-elf -march=armv8-a+nofp+nosimd -mabi=aapcs-soft -fno-exceptions -fno-rtti", + "libraries_supported": "picolibc,newlib" + }, { "variant": "armv4t_exn_rtti", "json": "armv4t_exn_rtti.json",