summaryrefslogtreecommitdiffstats
path: root/Makefile.inc1
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2012-02-29 22:58:51 +0000
committerdim <dim@FreeBSD.org>2012-02-29 22:58:51 +0000
commit2a09710001f8d4e44d609b777dbca5f6426072ed (patch)
tree2af64063549570e0a548bdc894aa9b6e2f75ee88 /Makefile.inc1
parent5fb3a72857db9900e8bdadb8f7d81bdc41db250d (diff)
downloadFreeBSD-src-2a09710001f8d4e44d609b777dbca5f6426072ed.zip
FreeBSD-src-2a09710001f8d4e44d609b777dbca5f6426072ed.tar.gz
Add a WITH_CLANG_IS_CC option for src.conf(5), disabled by default, that
installs clang as /usr/bin/cc, /usr/bin/c++ and /usr/bin/cpp. Note this does *not* disable building and installing gcc, which will still be available as /usr/bin/gcc, /usr/bin/g++ and /usr/bin/gcpp. If you want to disable gcc completely, you must use WITHOUT_GCC. MFC after: 2 weeks
Diffstat (limited to 'Makefile.inc1')
-rw-r--r--Makefile.inc112
1 files changed, 7 insertions, 5 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1
index dcebc18..f7ee6a9 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -1108,6 +1108,10 @@ _aicasm= sys/modules/aic7xxx/aicasm
_share= share/syscons/scrnmaps
.endif
+.if ${MK_GCC} != "no" && (${MK_CLANG_IS_CC} == "no" && ${CC:T:Mclang} != "clang")
+_gcc_tools= gnu/usr.bin/cc/cc_tools
+.endif
+
.if ${MK_KERBEROS} != "no"
_kerberos5_tools= kerberos5/tools
.endif
@@ -1136,7 +1140,7 @@ build-tools:
${MAKE} DIRPRFX=${_tool}/ build-tools
.endfor
.for _tool in \
- gnu/usr.bin/cc/cc_tools \
+ ${_gcc_tools} \
${_kerberos5_tools}
${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all)"; \
cd ${.CURDIR}/${_tool}; \
@@ -1166,14 +1170,12 @@ _kgzip= usr.sbin/kgzip
_binutils= gnu/usr.bin/binutils
.endif
-.if ${MK_CLANG} != "no"
-.if ${CC:T:Mclang} == "clang"
+.if ${MK_CLANG} != "no" && (${MK_CLANG_IS_CC} != "no" || ${CC:T:Mclang} == "clang")
_clang= usr.bin/clang
_clang_libs= lib/clang
.endif
-.endif
-.if ${MK_GCC} != "no"
+.if ${MK_GCC} != "no" && (${MK_CLANG_IS_CC} == "no" && ${CC:T:Mclang} != "clang")
_cc= gnu/usr.bin/cc
.endif
OpenPOWER on IntegriCloud