currently messing with firefox on ppc64le, tried enabling LTO and got 0:20.16 configure: error: compiler is incompatible with sanitize options 0:20.18 DEBUG: <truncated - see config.log for full output> 0:20.18 DEBUG: /* Override any gcc2 internal prototype to avoid an error. */ 0:20.19 DEBUG: /* We use char because int might match the return type of a gcc2 0:20.19 DEBUG: builtin and then its argument prototype would still apply. */ 0:20.19 DEBUG: char IceConnectionNumber(); 0:20.19 DEBUG: 0:20.19 DEBUG: int main() { 0:20.19 DEBUG: IceConnectionNumber() 0:20.19 DEBUG: ; return 0; } 0:20.19 DEBUG: configure:4123: /usr/bin/powerpc64le-unknown-linux-gnu-gcc -std=gnu99 -o conftest -mcpu=native -pipe -frecord-gcc-switches -fPIC -mminimal-toc -Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0 -Wl,--no-keep-memory -Wl,--reduce-memory-overheads -Wl,-rpath=/usr/lib64/firefox,--enable-new-dtags -Wl,--compress-debug-sections=zlib -fuse-ld=gold conftest.c 1>&5 0:20.19 DEBUG: /usr/lib/gcc/powerpc64le-unknown-linux-gnu/9.2.0/../../../../powerpc64le-unknown-linux-gnu/bin/ld.gold: --reduce-memory-overheads: unknown option 0:20.19 DEBUG: /usr/lib/gcc/powerpc64le-unknown-linux-gnu/9.2.0/../../../../powerpc64le-unknown-linux-gnu/bin/ld.gold: use the --help option for usage information 0:20.19 DEBUG: collect2: error: ld returned 1 exit status 0:20.19 DEBUG: configure: failed program was: 0:20.19 DEBUG: #line 4116 "configure" 0:20.19 DEBUG: #include "confdefs.h" 0:20.19 DEBUG: 0:20.19 DEBUG: int main() { 0:20.19 DEBUG: 0:20.19 DEBUG: ; return 0; } 0:20.19 DEBUG: configure: error: compiler is incompatible with sanitize options 0:20.19 ERROR: old-configure failed looks like there is the part that sets those flags ppc64) append-flags -fPIC -mminimal-toc # Reduce the memory requirements for linking if use clang ; then # Nothing to do :; elif tc-ld-is-gold ; then append-ldflags -Wl,--no-keep-memory else append-ldflags -Wl,--no-keep-memory -Wl,--reduce-memory-overheads fi ;; according to logic in eclass it should not pass -Wl,--reduce-memory-overheads looking further it seems that ld-tc-is-gold returns 1 on my system binutils[-default-gold] and that case loop above selects non-gold ldflags. but ebuild passes mozconfig_annotate "forcing ld=gold due to USE=lto" --enable-linker=gold but this ^ this setting is not seen in LDFLAGS in any way. toolchain-funcs tc-ld-is-gold check uses string parse as first try, and direct invocation of ld with LDFLAGS as second. but since nothing mentioning gold is in LDFLAGS at this point, bfd linker gets called and of course tc-ld-is-gold returns 1. ideas how to make it right? looks like for eclass check to work properly it NEEDS to be in LDFLAGS, not only in mozconfig.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9cc1ad54ffea7d8f0f4b94eede6dc3e182f1b152 commit 9cc1ad54ffea7d8f0f4b94eede6dc3e182f1b152 Author: Georgy Yakovlev <gyakovlev@gentoo.org> AuthorDate: 2019-08-30 02:02:42 +0000 Commit: Georgy Yakovlev <gyakovlev@gentoo.org> CommitDate: 2019-08-30 02:06:42 +0000 mozcoreconf-v6.eclass: fix lto on arm and ppc64 Closes: https://bugs.gentoo.org/692500 Acked-by: Jory Pratt <anarchy@gentoo.org> Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org> eclass/mozcoreconf-v6.eclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
it's broken again, for your information only.
since change was rolled back, reopening. explanation from comment #1 still stands, tc-ld-is-gold still returns incorrect results in this case, because firefox ebuild relies on buildsystem to enable gold and not LDFLAGS.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=55c2d50a216d04cf84cea4645fd23d2cfd5b485a commit 55c2d50a216d04cf84cea4645fd23d2cfd5b485a Author: Thomas Deutschmann <whissi@gentoo.org> AuthorDate: 2020-10-20 19:46:14 +0000 Commit: Thomas Deutschmann <whissi@gentoo.org> CommitDate: 2020-10-20 19:46:14 +0000 www-client/firefox: fix lto on arm and ppc64 Bug: https://bugs.gentoo.org/692500 Package-Manager: Portage-3.0.8, Repoman-3.0.2 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org> www-client/firefox/firefox-78.4.0.ebuild | 2 +- www-client/firefox/firefox-82.0.ebuild | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
^ tghanks. should no longer affect ppc64 at all, and fix arm-lto-gcc(who does that anyway? =) eclass still has this code though and can't use 'use lto' condition.