summaryrefslogtreecommitdiffstats
path: root/share/mk/bsd.sys.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 /share/mk/bsd.sys.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 'share/mk/bsd.sys.mk')
-rw-r--r--share/mk/bsd.sys.mk12
1 files changed, 6 insertions, 6 deletions
diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk
index 595655a..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(MK_CLANG_IS_CC) || ${MK_CLANG_IS_CC} == "no")) || !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(MK_CLANG_IS_CC) || ${MK_CLANG_IS_CC} == "no")) || !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" || (defined(MK_CLANG_IS_CC) && ${MK_CLANG_IS_CC} != "no")
+. 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(MK_CLANG_IS_CC) || ${MK_CLANG_IS_CC} == "no")) || !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(MK_CLANG_IS_CC) && ${MK_CLANG_IS_CC} != "no")) && 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" || (defined(MK_CLANG_IS_CC) && ${MK_CLANG_IS_CC} != "no")
+.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
OpenPOWER on IntegriCloud