From owner-svn-src-all@FreeBSD.ORG Thu Jul 22 18:47:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 222241065674; Thu, 22 Jul 2010 18:47:42 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EBD338FC26; Thu, 22 Jul 2010 18:47:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6MIlfEi030809; Thu, 22 Jul 2010 18:47:41 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6MIlfxH030805; Thu, 22 Jul 2010 18:47:41 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201007221847.o6MIlfxH030805@svn.freebsd.org> From: Rui Paulo Date: Thu, 22 Jul 2010 18:47:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210384 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 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, 22 Jul 2010 18:47:42 -0000 Author: rpaulo Date: Thu Jul 22 18:47:41 2010 New Revision: 210384 URL: http://svn.freebsd.org/changeset/base/210384 Log: Handle a few corner cases for clang like we did with icc. These should reduce the number of warnings seen while building the kernel. Submitted by: Dimitry Andric 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 Jul 22 18:44:40 2010 (r210383) +++ head/sys/conf/kern.mk Thu Jul 22 18:47:41 2010 (r210384) @@ -30,8 +30,10 @@ CWARNFLAGS?= -Wall -Wredundant-decls -Wn # reserved for user applications. # .if ${MACHINE_ARCH} == "i386" && ${CC} != "icc" -CFLAGS+= -mno-align-long-strings -mpreferred-stack-boundary=2 \ - -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 +.if ${CC} != "clang" +CFLAGS+= -mno-align-long-strings -mpreferred-stack-boundary=2 +.endif +CFLAGS+= -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 INLINE_LIMIT?= 8000 .endif Modified: head/sys/conf/kern.pre.mk ============================================================================== --- head/sys/conf/kern.pre.mk Thu Jul 22 18:44:40 2010 (r210383) +++ head/sys/conf/kern.pre.mk Thu Jul 22 18:47:41 2010 (r210384) @@ -92,7 +92,7 @@ INCLUDES+= -I$S/dev/cxgb CFLAGS= ${COPTFLAGS} ${C_DIALECT} ${DEBUG} ${CWARNFLAGS} CFLAGS+= ${INCLUDES} -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -.if ${CC} != "icc" +.if ${CC} != "icc" && ${CC} != "clang" CFLAGS+= -fno-common -finline-limit=${INLINE_LIMIT} .if ${MACHINE_CPUARCH} != "mips" CFLAGS+= --param inline-unit-growth=100 @@ -109,8 +109,8 @@ WERROR?= -Werror ASM_CFLAGS= -x assembler-with-cpp -DLOCORE ${CFLAGS} .if defined(PROFLEVEL) && ${PROFLEVEL} >= 1 -.if ${CC} == "icc" -.error "Profiling doesn't work with icc yet" +.if ${CC} == "icc" || ${CC} == "clang" +.error "Profiling doesn't work with icc or clang yet" .endif CFLAGS+= -DGPROF -falign-functions=16 .if ${PROFLEVEL} >= 2 Modified: head/sys/conf/kmod.mk ============================================================================== --- head/sys/conf/kmod.mk Thu Jul 22 18:44:40 2010 (r210383) +++ head/sys/conf/kmod.mk Thu Jul 22 18:47:41 2010 (r210384) @@ -114,7 +114,7 @@ CFLAGS+= -I. -I@ # for example. CFLAGS+= -I@/contrib/altq -.if ${CC} != "icc" +.if ${CC} != "icc" && ${CC} != "clang" CFLAGS+= -finline-limit=${INLINE_LIMIT} CFLAGS+= --param inline-unit-growth=100 CFLAGS+= --param large-function-growth=1000