diff options
author | dim <dim@FreeBSD.org> | 2012-02-29 22:58:51 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2012-02-29 22:58:51 +0000 |
commit | 2a09710001f8d4e44d609b777dbca5f6426072ed (patch) | |
tree | 2af64063549570e0a548bdc894aa9b6e2f75ee88 /sys/conf/kern.pre.mk | |
parent | 5fb3a72857db9900e8bdadb8f7d81bdc41db250d (diff) | |
download | FreeBSD-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.pre.mk')
-rw-r--r-- | sys/conf/kern.pre.mk | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk index 8edc1c9..07eaa38 100644 --- a/sys/conf/kern.pre.mk +++ b/sys/conf/kern.pre.mk @@ -34,7 +34,7 @@ _MINUS_O= -O2 .endif .endif .if ${MACHINE_CPUARCH} == "amd64" -.if ${CC:T:Mclang} != "clang" +.if ${MK_CLANG_IS_CC} == "no" && ${CC:T:Mclang} != "clang" COPTFLAGS?=-O2 -frename-registers -pipe .else COPTFLAGS?=-O2 -pipe @@ -84,7 +84,7 @@ INCLUDES+= -I$S/dev/cxgb -I$S/dev/cxgbe CFLAGS= ${COPTFLAGS} ${C_DIALECT} ${DEBUG} ${CWARNFLAGS} CFLAGS+= ${INCLUDES} -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -.if ${CC:T:Mclang} != "clang" +.if ${MK_CLANG_IS_CC} == "no" && ${CC:T:Mclang} != "clang" CFLAGS+= -fno-common -finline-limit=${INLINE_LIMIT} .if ${MACHINE_CPUARCH} != "mips" CFLAGS+= --param inline-unit-growth=100 |