From owner-svn-src-all@FreeBSD.ORG Thu Jan 1 08:18:10 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A854D999; Thu, 1 Jan 2015 08:18:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 94803645DB; Thu, 1 Jan 2015 08:18:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t018IA1D081862; Thu, 1 Jan 2015 08:18:10 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t018I9Mh081859; Thu, 1 Jan 2015 08:18:09 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201501010818.t018I9Mh081859@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 1 Jan 2015 08:18:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276496 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jan 2015 08:18:10 -0000 Author: imp Date: Thu Jan 1 08:18:08 2015 New Revision: 276496 URL: https://svnweb.freebsd.org/changeset/base/276496 Log: Move more of the warnings into kern.mk, as well as centralize that as the place where the C dialect is selected. Have a fairly long list of newly requires warning suppression for clang 3.5.0, also centralized in kern.mk. Survive the fallout of the removal of bsd.sys.mk from bsd.kmod.mk. Modified: head/sys/conf/kern.mk head/sys/conf/kern.pre.mk head/sys/conf/kmod.mk Modified: head/sys/conf/kern.mk ============================================================================== --- head/sys/conf/kern.mk Thu Jan 1 06:53:33 2015 (r276495) +++ head/sys/conf/kern.mk Thu Jan 1 08:18:08 2015 (r276496) @@ -29,7 +29,12 @@ NO_WSOMETIMES_UNINITIALIZED= -Wno-error- # enough to error out the whole kernel build. Display them anyway, so there is # some incentive to fix them eventually. CWARNEXTRA?= -Wno-error-tautological-compare -Wno-error-empty-body \ - -Wno-error-parentheses-equality -Wno-error-unused-function + -Wno-error-parentheses-equality -Wno-error-unused-function \ + -Wno-error-pointer-sign -Wno-error-format -Wno-error-parentheses \ + -Wno-error-switch -Wno-error-switch \ + -Wno-error-shift-count-negative \ + -Wno-error-shift-count-overflow \ + -Wno-error-constant-conversion .endif .if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 40300 @@ -164,13 +169,7 @@ CFLAGS+= -fstack-protector CFLAGS+= -gdwarf-2 .endif -# A whole bunch of new default warnings in clang 3.5 subpress for now until -# this can be cleaned up. -.if ${COMPILER_VERSION} >= 30500 -CFLAGS.clang+= -Wno-pointer-sign -Wno-constant-conversion -Wno-format \ - -Wno-shift-count-negative -Wno-tautological-pointer-compare \ - -Wno-shift-count-overflow -Wno-tautological-compare -.endif +CFLAGS+= ${CWARNEXTRA} CFLAGS+= ${CFLAGS.${COMPILER_TYPE}} @@ -187,3 +186,17 @@ PHONY_NOTMAIN = afterdepend afterinstall .PHONY: ${PHONY_NOTMAIN} .NOTMAIN: ${PHONY_NOTMAIN} + +CSTD= c99 + +.if ${CSTD} == "k&r" +CFLAGS+= -traditional +.elif ${CSTD} == "c89" || ${CSTD} == "c90" +CFLAGS+= -std=iso9899:1990 +.elif ${CSTD} == "c94" || ${CSTD} == "c95" +CFLAGS+= -std=iso9899:199409 +.elif ${CSTD} == "c99" +CFLAGS+= -std=iso9899:1999 +.else # CSTD +CFLAGS+= -std=${CSTD} +.endif # CSTD Modified: head/sys/conf/kern.pre.mk ============================================================================== --- head/sys/conf/kern.pre.mk Thu Jan 1 06:53:33 2015 (r276495) +++ head/sys/conf/kern.pre.mk Thu Jan 1 08:18:08 2015 (r276496) @@ -60,7 +60,6 @@ COPTFLAGS+= -fno-strict-aliasing .if !defined(NO_CPU_COPTFLAGS) COPTFLAGS+= ${_CPUCFLAGS} .endif -C_DIALECT= -std=c99 NOSTDINC= -nostdinc INCLUDES= ${NOSTDINC} ${INCLMAGIC} -I. -I$S @@ -88,7 +87,7 @@ INCLUDES+= -I$S/dev/cxgb -I$S/dev/cxgbe .endif -CFLAGS= ${COPTFLAGS} ${C_DIALECT} ${DEBUG} ${CWARNFLAGS} +CFLAGS= ${COPTFLAGS} ${DEBUG} ${CWARNFLAGS} CFLAGS+= ${INCLUDES} -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h CFLAGS_PARAM_INLINE_UNIT_GROWTH?=100 CFLAGS_PARAM_LARGE_FUNCTION_GROWTH?=1000 Modified: head/sys/conf/kmod.mk ============================================================================== --- head/sys/conf/kmod.mk Thu Jan 1 06:53:33 2015 (r276495) +++ head/sys/conf/kmod.mk Thu Jan 1 08:18:08 2015 (r276496) @@ -89,7 +89,6 @@ CFLAGS+= -D_KERNEL CFLAGS+= -DKLD_MODULE # Don't use any standard or source-relative include directories. -CSTD= c99 NOSTDINC= -nostdinc CFLAGS:= ${CFLAGS:N-I*} ${NOSTDINC} ${INCLMAGIC} ${CFLAGS:M-I*} .if defined(KERNBUILDDIR)