commit: 7011340a0f13dcada6f3be48054957035bc6e01a
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 17 01:52:27 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Sep 17 01:52:27 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7011340a
toolchain.eclass: fix building Clang on pure LLVM profiles
The features/clang profile sets AS="clang -c".
1. We can't use llvm-as because it's essentially for
internal use and isn't compatible anyway with cmdline args.
2. "clang -c" doesn't recognise --64 which configure
tries to add.
So, fake nothing to avoid configure trying to add that in.
See: 59d666d032353b054e3cdf4f18ad55e3346e73ca
Signed-off-by: Sam James <sam <AT> gentoo.org>
eclass/toolchain.eclass | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index 71342765c78e..cc7e0d258767 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -901,6 +901,17 @@ toolchain_src_configure() {
export ac_cv_std_swap_in_utility=no
fi
+ if [[ $(tc-getAS) == *clang* ]] ; then
+ # The features/clang profile sets AS="clang -c".
+ # 1. We can't use llvm-as because it's essentially for
+ # internal use and isn't compatible anyway with cmdline args.
+ # 2. "clang -c" doesn't recognise --64 which configure
+ # tries to add.
+ # So, fake nothing to avoid configure trying to add that in.
+ einfo "Forcing blank gcc_cv_as_flags for AS='clang -c'
compatibility"
+ export gcc_cv_as_flags=""
+ fi
+
einfo "CFLAGS=\"${CFLAGS}\""
einfo "CXXFLAGS=\"${CXXFLAGS}\""
einfo "LDFLAGS=\"${LDFLAGS}\""