commit:     db5b45315b4827253e52bbc1460ac0fbe615708c
Author:     Myckel Habets <gentoo-bugs <AT> habets-dobben <DOT> nl>
AuthorDate: Sun May  8 08:23:57 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue May 10 01:37:04 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=db5b4531

www-client/seamonkey: enable elf hack on architectures that support it

The old implementation, just disabled elf hack by default. Now we enable this
where it is enabled by default by seamonkey itself. According to firefox
this breaks with clang, so we copied over the check that firefox uses
to disable it on clang builds.

Bug: https://bugs.gentoo.org/836319
Signed-off-by: Myckel Habets <gentoo-bugs <AT> habets-dobben.nl>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 www-client/seamonkey/seamonkey-2.53.12.ebuild | 24 ++++++++++++++++++++++--
 1 file changed, 22 insertions(+), 2 deletions(-)

diff --git a/www-client/seamonkey/seamonkey-2.53.12.ebuild 
b/www-client/seamonkey/seamonkey-2.53.12.ebuild
index 4c512efa8daf..ca32eb5a0b66 100644
--- a/www-client/seamonkey/seamonkey-2.53.12.ebuild
+++ b/www-client/seamonkey/seamonkey-2.53.12.ebuild
@@ -393,8 +393,28 @@ src_configure() {
        # use startup-cache for faster startup time
        mozconfig_annotate '' --enable-startupcache
 
-       # Broken on some arches
-       mozconfig_annotate '' --disable-elf-hack
+       # Elf hack should be enabled by default on architectures that support 
it.
+       # On archs that don't support it, it should not be enabled by default.
+       # www-client/firefox says building with clang breaks elf hack on archs 
that
+       # support it, so they disable that. We assume this is the same for 
www-client/seamonkey.
+       # The code below is copied over from www-client/firefox.
+       if tc-is-clang ; then
+               # https://bugzilla.mozilla.org/show_bug.cgi?id=1482204
+               # https://bugzilla.mozilla.org/show_bug.cgi?id=1483822
+               # toolkit/moz.configure Elfhack section: target.cpu in ('arm', 
'x86', 'x86_64')
+               local disable_elf_hack=
+               if use amd64 ; then
+                       disable_elf_hack=yes
+               elif use x86 ; then
+                       disable_elf_hack=yes
+               elif use arm ; then
+                       disable_elf_hack=yes
+               fi
+
+               if [[ -n ${disable_elf_hack} ]] ; then
+                       mozconfig_annotate 'elf-hack is broken when using 
Clang' --disable-elf-hack
+               fi
+       fi
 
        # Disabled by default. See bug 836319 , comment 17.
        if ! use webrtc ; then

Reply via email to