svn commit: r207333 - projects/clangbsd
Roman Divacky
rdivacky at FreeBSD.org
Wed Apr 28 18:29:44 UTC 2010
Author: rdivacky
Date: Wed Apr 28 18:29:44 2010
New Revision: 207333
URL: http://svn.freebsd.org/changeset/base/207333
Log:
Improve the detection whether CC/CXX is clang thus allowing
buildworld with CC=cc etc. While at it allow it so that
CC/CXX can be set to different compilers.
Submitted by: Dominic Fandrey <kamikaze bsdforen de>
Modified:
projects/clangbsd/Makefile.inc1
Modified: projects/clangbsd/Makefile.inc1
==============================================================================
--- projects/clangbsd/Makefile.inc1 Wed Apr 28 18:28:08 2010 (r207332)
+++ projects/clangbsd/Makefile.inc1 Wed Apr 28 18:29:44 2010 (r207333)
@@ -252,9 +252,8 @@ XMAKE= TOOLS_PREFIX=${WORLDTMP} ${BMAKE
TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \
-DWITHOUT_GDB
-.if ${CC} == "clang" || ${CXX} == "clang++"
-MMINTRIN_CLANG= -isystem ${WORLDTMP}/usr/include/clang/1.5
-.endif
+CCMMINTRIN_CLANG= `env PATH=${TMPPATH} ${CC} --version | grep -Fq clang && echo -isystem ${WORLDTMP}/usr/include/clang/1.5`
+CXXMMINTRIN_CLANG= `env PATH=${TMPPATH} ${CXX} --version | grep -Fq clang && echo -isystem ${WORLDTMP}/usr/include/clang/1.5`
# world stage
WMAKEENV= ${CROSSENV} \
@@ -262,8 +261,8 @@ WMAKEENV= ${CROSSENV} \
VERSION="${VERSION}" \
INSTALL="sh ${.CURDIR}/tools/install.sh" \
PATH=${TMPPATH} \
- CC="${CC} ${MMINTRIN_CLANG} -isystem ${WORLDTMP}/usr/include -B${WORLDTMP}/usr/lib/ -L${WORLDTMP}/usr/lib/" \
- CXX="${CXX} ${MMINTRIN_CLANG} -isystem ${WORLDTMP}/usr/include -isystem ${WORLDTMP}/include/c++/4.2 -isystem ${WORLDTMP}/include/c++/4.2/backward -B${WORLDTMP}/usr/lib/ -L${WORLDTMP}/usr/lib/"
+ CC="${CC} ${CCMMINTRIN_CLANG} -isystem ${WORLDTMP}/usr/include -B${WORLDTMP}/usr/lib/ -L${WORLDTMP}/usr/lib/" \
+ CXX="${CXX} ${CXXMMINTRIN_CLANG} -isystem ${WORLDTMP}/usr/include -isystem ${WORLDTMP}/include/c++/4.2 -isystem ${WORLDTMP}/include/c++/4.2/backward -B${WORLDTMP}/usr/lib/ -L${WORLDTMP}/usr/lib/"
.if ${MK_CDDL} == "no" || defined(NO_CTF)
WMAKEENV+= NO_CTF=1
More information about the svn-src-projects
mailing list