summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/conf/kern.mk6
-rw-r--r--sys/conf/kern.pre.mk4
-rw-r--r--sys/conf/kmod.mk2
3 files changed, 6 insertions, 6 deletions
diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk
index d2ed68d..76042d2 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 ${MK_CLANG_IS_CC} != "no" || ${CC:T:Mclang} == "clang"
+.if ${CC:T:Mclang} == "clang" || (defined(MK_CLANG_IS_CC) && ${MK_CLANG_IS_CC} != "no")
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 ${MK_CLANG_IS_CC} == "no" && ${CC:T:Mclang} != "clang"
+.if ${CC:T:Mclang} != "clang" && (!defined(MK_CLANG_IS_CC) || ${MK_CLANG_IS_CC} == "no")
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 ${MK_CLANG_IS_CC} == "no" && ${CC:T:Mclang} != "clang"
+.if ${CC:T:Mclang} != "clang" && (!defined(MK_CLANG_IS_CC) || ${MK_CLANG_IS_CC} == "no")
CFLAGS+= -mno-sse
.else
CFLAGS+= -mno-aes -mno-avx
diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk
index 07eaa38..fa4ef87 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 ${MK_CLANG_IS_CC} == "no" && ${CC:T:Mclang} != "clang"
+.if ${CC:T:Mclang} != "clang" && (!defined(MK_CLANG_IS_CC) || ${MK_CLANG_IS_CC} == "no")
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 ${MK_CLANG_IS_CC} == "no" && ${CC:T:Mclang} != "clang"
+.if ${CC:T:Mclang} != "clang" && (!defined(MK_CLANG_IS_CC) || ${MK_CLANG_IS_CC} == "no")
CFLAGS+= -fno-common -finline-limit=${INLINE_LIMIT}
.if ${MACHINE_CPUARCH} != "mips"
CFLAGS+= --param inline-unit-growth=100
diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk
index cb460ee..98437b3 100644
--- a/sys/conf/kmod.mk
+++ b/sys/conf/kmod.mk
@@ -108,7 +108,7 @@ CFLAGS+= -I. -I@
# for example.
CFLAGS+= -I@/contrib/altq
-.if ${MK_CLANG_IS_CC} == "no" && ${CC:T:Mclang} != "clang"
+.if ${CC:T:Mclang} != "clang" && (!defined(MK_CLANG_IS_CC) || ${MK_CLANG_IS_CC} == "no")
CFLAGS+= -finline-limit=${INLINE_LIMIT}
CFLAGS+= --param inline-unit-growth=100
CFLAGS+= --param large-function-growth=1000
OpenPOWER on IntegriCloud