commit: 5e5c9d5c524871f5af260557dbd2962b8eec5087 Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Thu Aug 24 23:13:08 2023 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Thu Aug 24 23:13:08 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5e5c9d5c
profiles/features/llvm: drop problematic LDFLAGS clang-common already handles setting these for us, and if we set it in profiles, then it gets passed down to gcc via clang for things like Fortran where clang is just acting as the driver. Closes: https://bugs.gentoo.org/908798 Signed-off-by: Sam James <sam <AT> gentoo.org> profiles/features/llvm/make.defaults | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/profiles/features/llvm/make.defaults b/profiles/features/llvm/make.defaults index a677172b269d..ce3401222615 100644 --- a/profiles/features/llvm/make.defaults +++ b/profiles/features/llvm/make.defaults @@ -11,7 +11,10 @@ CXX="clang++" LD="ld.lld" # linker flags -LDFLAGS="${LDFLAGS} -fuse-ld=lld -rtlib=compiler-rt -unwindlib=libunwind -Wl,--as-needed" +# We don't set LDFLAGS here for linker, rtlib, etc because clang-common enforces +# the needed bits for us and it confuses clang->gcc for stuff like Fortran, +# see bug #908798. +LDFLAGS="${LDFLAGS} -Wl,--as-needed" # use LLVM-provided binutils AR="llvm-ar"
