Hi, similarly to libc++ and libc++abi, we want to compile clang with clang and not rely on an external bootstrap compiler.
Only if CC and CXX are overwriten to use egcc/eg++, we need to use those. That's needed for the initial bootstrap. Not sure the diff is clean enough. One could do something like .if ${BOOTSTRAP_CLANG} == "yes" CC= egcc CXX= eg++ .else CC= clang CXX= clang++ .endif Comments? Patrick diff --git a/gnu/usr.bin/clang/Makefile.inc b/gnu/usr.bin/clang/Makefile.inc index 9b5aee613760..70f064b93017 100644 --- a/gnu/usr.bin/clang/Makefile.inc +++ b/gnu/usr.bin/clang/Makefile.inc @@ -2,8 +2,13 @@ LLVM_SRCS?= ${.CURDIR}/../../../llvm -CC= egcc -CXX= eg++ +.if "${CC}" != "egcc" +CC= clang +.endif + +.if "${CXX}" != "eg++" +CXX= clang++ +.endif DEBUG= NOPIE=