summaryrefslogtreecommitdiffstats
path: root/sys/conf/kern.mk
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 /sys/conf/kern.mk
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 'sys/conf/kern.mk')
-rw-r--r--sys/conf/kern.mk6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk
index 596d6ce..d2ed68d 100644
--- a/sys/conf/kern.mk
+++ b/sys/conf/kern.mk
@@ -15,7 +15,7 @@ CWARNFLAGS?= -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \
# Disable a few warnings for clang, since there are several places in the
# kernel where fixing them is more trouble than it is worth, or where there is
# a false positive.
-.if ${CC:T:Mclang} == "clang"
+.if ${MK_CLANG_IS_CC} != "no" || ${CC:T:Mclang} == "clang"
NO_WCONSTANT_CONVERSION= -Wno-constant-conversion
NO_WARRAY_BOUNDS= -Wno-array-bounds
NO_WSHIFT_COUNT_NEGATIVE= -Wno-shift-count-negative
@@ -50,7 +50,7 @@ CWARNEXTRA?= -Wno-error-tautological-compare -Wno-error-empty-body \
# -mno-sse3, -mno-ssse3, -mno-sse41 and -mno-sse42
#
.if ${MACHINE_CPUARCH} == "i386"
-.if ${CC:T:Mclang} != "clang"
+.if ${MK_CLANG_IS_CC} == "no" && ${CC:T:Mclang} != "clang"
CFLAGS+= -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-sse
.else
CFLAGS+= -mno-aes -mno-avx
@@ -98,7 +98,7 @@ INLINE_LIMIT?= 15000
# (-mfpmath= is not supported)
#
.if ${MACHINE_CPUARCH} == "amd64"
-.if ${CC:T:Mclang} != "clang"
+.if ${MK_CLANG_IS_CC} == "no" && ${CC:T:Mclang} != "clang"
CFLAGS+= -mno-sse
.else
CFLAGS+= -mno-aes -mno-avx
OpenPOWER on IntegriCloud