Created attachment 825463 [details] build log Disabling lld builds fine
Created attachment 825465 [details] emerge --info
fwiw I can reproduce on amd64 builds fine with lld if I use clang though, only fails with gcc+lld
Also builds fine with gcc+lld I add -fno-lto to CFLAGS (this package uses lto by default)
(In reply to Ionen Wolkens from comment #3) > Also builds fine with gcc+lld I add -fno-lto to CFLAGS (this package uses > lto by default) Oh yeah, main thing is the error you get when you don't have llvmgold and try to use -flto with gcc+lld (I don't keep it around, so I don't expect gcc+lld lto to work). Ideally be nice if package didn't randomly pass -flto, but if had llvmgold it'd probably work (haven't tried).
Or more specifically I "assume" you have llvm[-binutils-plugins], just noticed llvmgold is just doing a symlink.
[ebuild R ] sys-devel/llvm-14.0.6-r2:14::gentoo USE="binutils-plugin libffi ncurses xml -debug -doc -exegesis -libedit -test -verify-sig -xar -z3" LLVM_TARGETS="(AArch64) (AMDGPU) (ARM) (AVR) (BPF) (Hexagon) (Lanai) (MSP430) (Mips) (NVPTX) (PowerPC) (RISCV) (Sparc) (SystemZ) (VE) (WebAssembly) (X86) (XCore) (-ARC) (-CSKY) (-M68k)" 0 KiB
Hrm, thought that was letting lto work but maybe I'm wrong? Can't say I really ever tried to use gcc+lld with -flto as I don't expect much from that.
(In reply to Ionen Wolkens from comment #4) > Ideally be nice if package didn't randomly pass -flto tl;dr this bug is just about that although you could work around it by adding -fno-lto to your CFLAGS if want to keep using lld on packages that do -flto by default
I was focusing on trying gcc+lld manually, but then I realized in the ebuild meson options have -Db_lto=true (coming from upstream build options). So this was in ebuild directly that lto was enabled, sorry for that I will push a revbump with USE=lto or similar, hopefully it fixes it for you
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=06d1ca8561cf0bd6ee0a3a8afa8e6aaa09e05a14 commit 06d1ca8561cf0bd6ee0a3a8afa8e6aaa09e05a14 Author: Bernard Cafarelli <voyageur@gentoo.org> AuthorDate: 2022-11-19 10:57:04 +0000 Commit: Bernard Cafarelli <voyageur@gentoo.org> CommitDate: 2022-11-19 10:58:01 +0000 app-mobilephone/scrcpy: add USE flag for LTO This was hardcoded in ebuild Closes: https://bugs.gentoo.org/878317 Signed-off-by: Bernard Cafarelli <voyageur@gentoo.org> app-mobilephone/scrcpy/metadata.xml | 6 +++++ app-mobilephone/scrcpy/scrcpy-1.24-r2.ebuild | 37 ++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+)
Unless upstream is doing something special with lto, generally these should just be left disabled rather than giving a USE. Nothing stops someone from just adding -flto to their CFLAGS if they actually want it, and will probably it setup the right way for it to work.