From f7f8f3bd2c1f04a2691ca9f760ffd545315f9fec Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Mon, 9 Dec 2024 13:28:34 +0000 Subject: [PATCH] Fix build failures in aarch64a_[be_]soft_nofp variants. Those two variants have `-fno-exceptions -fno-rtti` in the configuration file that specifies options for building the library. None of the other library variants is built with this flags, not even the other variants intended for use in _applications_ without exceptions and RTTI. If you try to build libc++abi with those flags, it fails to build, because `private_typeinfo.cpp` is unconditionally included in the library and unconditionally uses `dynamic_cast`. (And I assume that it's OK to use `dynamic_cast` in that part of libc++abi if the application will never use RTTI, because then it won't include that object file in the first place.) --- arm-multilib/json/variants/aarch64a_be_soft_nofp.json | 2 +- arm-multilib/json/variants/aarch64a_soft_nofp.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arm-multilib/json/variants/aarch64a_be_soft_nofp.json b/arm-multilib/json/variants/aarch64a_be_soft_nofp.json index 67ca0013..378d6017 100644 --- a/arm-multilib/json/variants/aarch64a_be_soft_nofp.json +++ b/arm-multilib/json/variants/aarch64a_be_soft_nofp.json @@ -3,7 +3,7 @@ "common": { "TARGET_ARCH": "aarch64a", "VARIANT": "aarch64a_be_soft_nofp", - "COMPILE_FLAGS": "-march=armv8-a+nofp+nosimd -mbig-endian -mabi=aapcs-soft -mno-unaligned-access -fno-exceptions -fno-rtti", + "COMPILE_FLAGS": "-march=armv8-a+nofp+nosimd -mbig-endian -mabi=aapcs-soft -mno-unaligned-access", "ENABLE_EXCEPTIONS": "OFF", "ENABLE_RTTI": "OFF", "TEST_EXECUTOR": "fvp", diff --git a/arm-multilib/json/variants/aarch64a_soft_nofp.json b/arm-multilib/json/variants/aarch64a_soft_nofp.json index b939c543..4eb508a3 100644 --- a/arm-multilib/json/variants/aarch64a_soft_nofp.json +++ b/arm-multilib/json/variants/aarch64a_soft_nofp.json @@ -3,7 +3,7 @@ "common": { "TARGET_ARCH": "aarch64a", "VARIANT": "aarch64a_soft_nofp", - "COMPILE_FLAGS": "-march=armv8-a+nofp+nosimd -mabi=aapcs-soft -mno-unaligned-access -fno-exceptions -fno-rtti", + "COMPILE_FLAGS": "-march=armv8-a+nofp+nosimd -mabi=aapcs-soft -mno-unaligned-access", "ENABLE_EXCEPTIONS": "OFF", "ENABLE_RTTI": "OFF", "TEST_EXECUTOR": "qemu",