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 /share/mk/bsd.sys.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 'share/mk/bsd.sys.mk')
-rw-r--r-- | share/mk/bsd.sys.mk | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk index 9b56154..401e671 100644 --- a/share/mk/bsd.sys.mk +++ b/share/mk/bsd.sys.mk @@ -28,7 +28,7 @@ CFLAGS += -std=${CSTD} . if defined(WARNS) . if ${WARNS} >= 1 CWARNFLAGS += -Wsystem-headers -. if !defined(NO_WERROR) && (${CC:T:Mclang} != "clang" || !defined(NO_WERROR.clang)) +. if !defined(NO_WERROR) && ((${MK_CLANG_IS_CC} == "no" && ${CC:T:Mclang} != "clang") || !defined(NO_WERROR.clang)) CWARNFLAGS += -Werror . endif . endif @@ -42,7 +42,7 @@ CWARNFLAGS += -W -Wno-unused-parameter -Wstrict-prototypes\ . if ${WARNS} >= 4 CWARNFLAGS += -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch\ -Wshadow -Wunused-parameter -. if !defined(NO_WCAST_ALIGN) && (${CC:T:Mclang} != "clang" || !defined(NO_WCAST_ALIGN.clang)) +. if !defined(NO_WCAST_ALIGN) && ((${MK_CLANG_IS_CC} == "no" && ${CC:T:Mclang} != "clang") || !defined(NO_WCAST_ALIGN.clang)) CWARNFLAGS += -Wcast-align . endif . endif @@ -59,7 +59,7 @@ CWARNFLAGS += -Wno-uninitialized CWARNFLAGS += -Wno-pointer-sign # Clang has more warnings enabled by default, and when using -Wall, so if WARNS # is set to low values, these have to be disabled explicitly. -. if ${CC:T:Mclang} == "clang" +. if ${MK_CLANG_IS_CC} != "no" || ${CC:T:Mclang} == "clang" . if ${WARNS} <= 3 CWARNFLAGS += -Wno-tautological-compare -Wno-unused-value\ -Wno-parentheses-equality -Wno-unused-function\ @@ -84,12 +84,12 @@ WFORMAT = 1 . if ${WFORMAT} > 0 #CWARNFLAGS += -Wformat-nonliteral -Wformat-security -Wno-format-extra-args CWARNFLAGS += -Wformat=2 -Wno-format-extra-args -. if !defined(NO_WERROR) && (${CC:T:Mclang} != "clang" || !defined(NO_WERROR.clang)) +. if !defined(NO_WERROR) && ((${MK_CLANG_IS_CC} == "no" && ${CC:T:Mclang} != "clang") || !defined(NO_WERROR.clang)) CWARNFLAGS += -Werror . endif . endif . endif -. if defined(NO_WFORMAT) || (${CC:T:Mclang} == "clang" && defined(NO_WFORMAT.clang)) +. if defined(NO_WFORMAT) || ((${MK_CLANG_IS_CC} != "no" || ${CC:T:Mclang} == "clang") && defined(NO_WFORMAT.clang)) CWARNFLAGS += -Wno-format . endif .endif @@ -98,7 +98,7 @@ CWARNFLAGS += -Wno-format CWARNFLAGS += -Wno-unknown-pragmas .endif -.if ${CC:T:Mclang} == "clang" +.if ${MK_CLANG_IS_CC} != "no" || ${CC:T:Mclang} == "clang" CLANG_NO_IAS = -no-integrated-as CLANG_OPT_SMALL = -mllvm -stack-alignment=8 -mllvm -inline-threshold=3 \ -mllvm -enable-load-pre=false |