commit:     c87ecd828f4b4de9ba80c32d3eaf19bfcfc6deea
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 26 11:49:09 2020 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Mon Oct 26 11:49:09 2020 +0000
URL:        https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=c87ecd82

scripts/bootstrap-prefix.sh: add detection support for newer Apple clang

Thanks Alexander Bezrukov for an initial patch.  I went with a slightly
different approach, to be a bit more specific and hopefully not match
something unexpected in the future.

Closes: https://bugs.gentoo.org/751067
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>

 scripts/bootstrap-prefix.sh | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh
index 313139c0e8..559eb3a356 100755
--- a/scripts/bootstrap-prefix.sh
+++ b/scripts/bootstrap-prefix.sh
@@ -222,6 +222,23 @@ configure_toolchain() {
                        local ccvers="$( (unset CHOST; gcc --version 
2>/dev/null) )"
                        local mycc=
                        case "${ccvers}" in
+                               *"Apple clang version "*)
+                                       vers=${ccvers#*Apple clang version }
+                                       vers=${vers% (clang-*}
+                                       # this is Clang, recent enough to 
compile recent clang
+                                       mycc=clang
+                                       compiler_stage1+="
+                                               ${llvm_deps}
+                                               sys-devel/llvm
+                                               sys-devel/clang
+                                               sys-libs/libcxxabi
+                                               sys-libs/libcxx"
+                                       ;;
+                                       esac
+                                       CC=clang
+                                       CXX=clang++
+                                       linker=sys-devel/binutils-apple
+                                       ;;
                                *"Apple LLVM version "*)
                                        vers=${ccvers#*Apple LLVM version }
                                        vers=${vers% (clang-*}

Reply via email to