Date: Sat, 3 Mar 2012 23:49:53 +0000 (UTC) From: Dimitry Andric <dim@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r232476 - in head: share/mk sys/conf Message-ID: <201203032349.q23NnrIb005355@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dim Date: Sat Mar 3 23:49:53 2012 New Revision: 232476 URL: http://svn.freebsd.org/changeset/base/232476 Log: 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 Modified: head/share/mk/bsd.sys.mk head/sys/conf/kern.mk head/sys/conf/kern.pre.mk head/sys/conf/kmod.mk Modified: head/share/mk/bsd.sys.mk ============================================================================== --- head/share/mk/bsd.sys.mk Sat Mar 3 21:39:12 2012 (r232475) +++ head/share/mk/bsd.sys.mk Sat Mar 3 23:49:53 2012 (r232476) @@ -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 - . 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 Modified: head/sys/conf/kern.mk ============================================================================== --- head/sys/conf/kern.mk Sat Mar 3 21:39:12 2012 (r232475) +++ head/sys/conf/kern.mk Sat Mar 3 23:49:53 2012 (r232476) @@ -15,7 +15,7 @@ CWARNFLAGS?= -Wall -Wredundant-decls -Wn # 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-com # -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 Modified: head/sys/conf/kern.pre.mk ============================================================================== --- head/sys/conf/kern.pre.mk Sat Mar 3 21:39:12 2012 (r232475) +++ head/sys/conf/kern.pre.mk Sat Mar 3 23:49:53 2012 (r232476) @@ -34,7 +34,7 @@ _MINUS_O= -O2 .endif .endif .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" 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" && (!defined(MK_CLANG_IS_CC) || ${MK_CLANG_IS_CC} == "no") +.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 Modified: head/sys/conf/kmod.mk ============================================================================== --- head/sys/conf/kmod.mk Sat Mar 3 21:39:12 2012 (r232475) +++ head/sys/conf/kmod.mk Sat Mar 3 23:49:53 2012 (r232476) @@ -108,7 +108,7 @@ CFLAGS+= -I. -I@ # for example. CFLAGS+= -I@/contrib/altq -.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+= -finline-limit=${INLINE_LIMIT} CFLAGS+= --param inline-unit-growth=100 CFLAGS+= --param large-function-growth=1000
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201203032349.q23NnrIb005355>