The upcoming 23.0 profile has -Wl,-z,pack-relative-relocs in LDFLAGS, which enables DT_RELR. This essentially supercedes Firefox's and Thunderbird's built-in "ELF hack" feature, but it's not compatible with it, so ELF hack needs to be disabled if DT_RELR is enabled.
Right, it is indeed a generic version of "ELF hack" (see e.g. https://maskray.me/blog/2021-10-31-relative-relocations-and-relr).
Since elf-hack is currently disabled anyway when using clang, I think something like this could work? elif tc-is-gcc ; then filter-ldflags pack-relative-relocs which will enable upstream's elf-hack when using gcc. Another option is to always disable elf-hack anyway, since clang should be used to compile these mozilla products.
Or it can be matched with "is-ldflag pack-relative-relocs" and then disable/enable upstream's elf-hack whichever way we desire to have it.
hmm, how does this fail? currently, I'm using both pack-relative-relocs and Firefox and see no issue.
ah - disregard. I forgot firefox uses clang to build :/
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1fd128403bb5b3b4619b07e4964f7dfff635f41c commit 1fd128403bb5b3b4619b07e4964f7dfff635f41c Author: Joonas Niilola <juippis@gentoo.org> AuthorDate: 2023-08-01 10:03:51 +0000 Commit: Joonas Niilola <juippis@gentoo.org> CommitDate: 2023-08-01 10:04:27 +0000 www-client/firefox: add 116.0 Closes: https://bugs.gentoo.org/910689 Bug: https://bugs.gentoo.org/910290 Closes: https://bugs.gentoo.org/888055 Bug: https://bugs.gentoo.org/909724 Closes: https://bugs.gentoo.org/904354 Signed-off-by: Joonas Niilola <juippis@gentoo.org> www-client/firefox/Manifest | 101 +++ www-client/firefox/firefox-116.0.ebuild | 1466 +++++++++++++++++++++++++++++++ 2 files changed, 1567 insertions(+)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=88ead78a85613171465a92233bc811612ab98ea1 commit 88ead78a85613171465a92233bc811612ab98ea1 Author: Joonas Niilola <juippis@gentoo.org> AuthorDate: 2024-03-24 16:33:37 +0000 Commit: Joonas Niilola <juippis@gentoo.org> CommitDate: 2024-03-24 17:39:15 +0000 www-client/firefox: filter pack-relative-relocs on 124.0.1 - let the build system handle it via configure. Bug: https://bugs.gentoo.org/916405 Bug: https://bugs.gentoo.org/888055 Signed-off-by: Joonas Niilola <juippis@gentoo.org> www-client/firefox/firefox-124.0.1.ebuild | 3 +++ 1 file changed, 3 insertions(+)