summaryrefslogtreecommitdiffstats
path: root/sys/conf/kern.mk
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2012-03-03 23:49:53 +0000
committerdim <dim@FreeBSD.org>2012-03-03 23:49:53 +0000
commitae227ddf7fe7c0964da0d2b5d1a31ab5f41f56da (patch)
tree8bddbe048cd5825befb0f0896ab230babb122fec /sys/conf/kern.mk
parent6485e73b874436e497d338e5ac1604e2e491a467 (diff)
downloadFreeBSD-src-ae227ddf7fe7c0964da0d2b5d1a31ab5f41f56da.zip
FreeBSD-src-ae227ddf7fe7c0964da0d2b5d1a31ab5f41f56da.tar.gz
Revert r232473. I have been convinced by Doug Barton and Bjoern Zeeb
that it is better to error out when people attempt to build using the wrong bsd.*.mk files, than to silently ignore the problem. This means, that after this commit, if you want to build kernel modules by hand (or via a port) from a head source tree, you *must* make sure the files in /usr/share/mk are in sync with that tree. If that isn't possible, for example when you are running on an older FreeBSD branch, you can: - Run "make buildenv" from your head source tree, to have the correct environment setup. (It's advisable to have run "make buildworld", or at a minimum "make toolchain" first.) - Alternatively, set MAKESYSPATH to the share/mk directory under your head source tree. If your build tools are too old, other problems may still occur. - Alternatively, use "make -m" and specify the share/mk directory under your head source tree. Again, build tools that are too old may still result in trouble. 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 76042d2..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" || (defined(MK_CLANG_IS_CC) && ${MK_CLANG_IS_CC} != "no")
+.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" && (!defined(MK_CLANG_IS_CC) || ${MK_CLANG_IS_CC} == "no")
+.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" && (!defined(MK_CLANG_IS_CC) || ${MK_CLANG_IS_CC} == "no")
+.if ${MK_CLANG_IS_CC} == "no" && ${CC:T:Mclang} != "clang"
CFLAGS+= -mno-sse
.else
CFLAGS+= -mno-aes -mno-avx
OpenPOWER on IntegriCloud