diff options
author | George Burgess IV <gbiv@google.com> | 2023-10-30 10:25:14 -0600 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2023-12-15 03:17:36 +0000 |
commit | 9c2e28f75caf3d9ada6f570e70500e00c2d6cd5d (patch) | |
tree | a009fbf103aa183e5f20ea940eedc17df88fb2b1 /dev-libs | |
parent | net-analyzer/dsniff: add 2.4_beta1_p31, fix GCC 14 compile (diff) | |
download | gentoo-9c2e28f75caf3d9ada6f570e70500e00c2d6cd5d.tar.gz gentoo-9c2e28f75caf3d9ada6f570e70500e00c2d6cd5d.tar.bz2 gentoo-9c2e28f75caf3d9ada6f570e70500e00c2d6cd5d.zip |
dev-libs/gmp: add -fno-sanitize-address-globals-dead-stripping
Clang recently defaulted `-fsanitize-address-globals-dead-stripping` to
'on' for ELF: https://reviews.llvm.org/D152604. This breaks gmp's
configure checks, as it detects that rodata sections should be declared
with:
```
.rodata.foo,"aG",@progbits,foo,comdat
```
instead of:
```
.rodata,"a",@progbits
```
Since Clang uses LLVM-specific assembler extensions to make this ASAN
symbol GCing work, disable the feature for this package.
Signed-off-by: George Burgess IV <gbiv@google.com>
Closes: https://github.com/gentoo/gentoo/pull/33592
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-libs')
-rw-r--r-- | dev-libs/gmp/gmp-6.3.0-r1.ebuild (renamed from dev-libs/gmp/gmp-6.3.0.ebuild) | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/dev-libs/gmp/gmp-6.3.0.ebuild b/dev-libs/gmp/gmp-6.3.0-r1.ebuild index 2cb6293940af..ee4311e99aaa 100644 --- a/dev-libs/gmp/gmp-6.3.0.ebuild +++ b/dev-libs/gmp/gmp-6.3.0-r1.ebuild @@ -163,6 +163,14 @@ multilib_src_configure() { export ac_cv_host="${gmp_host}" fi + # Clang with -fsanitize=address may emit weird section names in its asm, + # which causes gmp's configure checks to select a broken way of + # specifying `.rodata`. Disable this feature, which was introduced in + # Clang 15 (and defaulted to on in Clang 18). + if tc-is-clang && [[ "$(clang-major-version)" -ge 15 ]]; then + append-cxxflags "-fno-sanitize-address-globals-dead-stripping" + fi + ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" } |