passing --disable-elf-hack is not supported at all on ppc64, build will die 0:12.13 Traceback (most recent call last): 0:12.13 File "/var/tmp/portage/www-client/firefox-77.0.1/work/firefox-77.0.1/configure.py", line 181, in <module> 0:12.13 sys.exit(main(sys.argv)) 0:12.13 File "/var/tmp/portage/www-client/firefox-77.0.1/work/firefox-77.0.1/configure.py", line 52, in main 0:12.13 sandbox.run(os.path.join(os.path.dirname(__file__), 'moz.configure')) 0:12.13 File "/var/tmp/portage/www-client/firefox-77.0.1/work/firefox-77.0.1/python/mozbuild/mozbuild/configure/__init__.py", line 455, in run 0:12.13 self._value_for(option) 0:12.13 File "/var/tmp/portage/www-client/firefox-77.0.1/work/firefox-77.0.1/python/mozbuild/mozbuild/configure/__init__.py", line 545, in _value_for 0:12.13 return self._value_for_option(obj) 0:12.13 File "/var/tmp/portage/www-client/firefox-77.0.1/work/firefox-77.0.1/python/mozbuild/mozbuild/util.py", line 1018, in method_call 0:12.13 cache[args] = self.func(instance, *args) 0:12.13 File "/var/tmp/portage/www-client/firefox-77.0.1/work/firefox-77.0.1/python/mozbuild/mozbuild/configure/__init__.py", line 613, in _value_for_option 0:12.13 % option_string.split('=', 1)[0]) 0:12.13 mozbuild.configure.options.InvalidOptionError: --disable-elf-hack is not available in this configuration 0:12.22 *** Fix above errors and then restart with\ 0:12.22 "./mach build" 0:12.22 gmake: *** [client.mk:115: configure] Error 1 * ERROR: www-client/firefox-77.0.1::gentoo failed (configure phase): * (no error message) thunderbird is the same I believe
Could you please try https://src.fedoraproject.org/rpms/firefox/blob/master/f/build-disable-elfhack.patch which should disable elfhack by default?
issue is a bit different. mozilla's build system is a bit funky, and even if you try to disable parameter which is already disabled on certain arch, it will exit with an error. elf-hack does not work on ppc64 at all and is disabled by default, but passing --disable-elf-hack triggers the error =) patch like this in mind: > @@ -603,7 +603,7 @@ src_configure() { > # when they would normally be larger than 2GiB. > append-ldflags "-Wl,--compress-debug-sections=zlib" > > - if use clang && ! use arm64; then > + if use clang && ! use arm64 && ! use ppc64; then > # https://bugzilla.mozilla.org/show_bug.cgi?id=1482204 > # https://bugzilla.mozilla.org/show_bug.cgi?id=1483822 > mozconfig_annotate 'elf-hack is broken when using Clang' --disable-elf-hack -- We just need to never pass --disable-elf-hack on ppc64 (and probably arm64) at all, regardless of clang. I'll find the code in question and will link it.. it still does not build with clang anyway on ppc64, I'll post errors later.
https://github.com/mozilla/gecko-dev/blob/7cadba1d8b8feaec4615f5bb98aac4b8a719793c/toolkit/moz.configure#L1077-L1094 # Elfhack # ============================================================== with only_when('--enable-compile-environment'): @depends(host, target) def has_elfhack(host, target): return target.kernel == 'Linux' and host.kernel == 'Linux' and \ target.cpu in ('arm', 'x86', 'x86_64') so it should only be passed on above arches, if ever passed
you might want to have a look at what freebsd does, I saw a whole patchset adressing ppc64 issues: https://svnweb.freebsd.org/ports/head/www/firefox/files/ they use clang per default for all packages, so all of these patches have a workflow with clang in mind
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8ba4f3d0f38b11701e4dc47d35bd106d5f7b7a2f commit 8ba4f3d0f38b11701e4dc47d35bd106d5f7b7a2f Author: Georgy Yakovlev <gyakovlev@gentoo.org> AuthorDate: 2020-07-03 01:08:06 +0000 Commit: Thomas Deutschmann <whissi@gentoo.org> CommitDate: 2020-07-03 11:11:34 +0000 www-client/firefox: pass --disable-elf-hack only on supported arches Bug: https://bugs.gentoo.org/727040 Package-Manager: Portage-2.3.103, Repoman-2.3.23 Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/16555 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org> www-client/firefox/firefox-78.0.1.ebuild | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-)