From owner-svn-src-all@FreeBSD.ORG Sun Oct 23 16:27:04 2011 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 4689E106564A; Sun, 23 Oct 2011 16:27:04 +0000 (UTC) (envelope-from rmh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 37B7E8FC08; Sun, 23 Oct 2011 16:27:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9NGR4Zp046271; Sun, 23 Oct 2011 16:27:04 GMT (envelope-from rmh@svn.freebsd.org) Received: (from rmh@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9NGR47P046269; Sun, 23 Oct 2011 16:27:04 GMT (envelope-from rmh@svn.freebsd.org) Message-Id: <201110231627.p9NGR47P046269@svn.freebsd.org> From: Robert Millan Date: Sun, 23 Oct 2011 16:27:04 +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: r226665 - 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: Sun, 23 Oct 2011 16:27:04 -0000 Author: rmh Date: Sun Oct 23 16:27:03 2011 New Revision: 226665 URL: http://svn.freebsd.org/changeset/base/226665 Log: Conditionalize a pair of FreeBSD GCC extensions so that its CFLAGS are only used with FreeBSD GCC. Approved by: kib (mentor) Modified: head/sys/conf/kern.mk Modified: head/sys/conf/kern.mk ============================================================================== --- head/sys/conf/kern.mk Sun Oct 23 16:04:07 2011 (r226664) +++ head/sys/conf/kern.mk Sun Oct 23 16:27:03 2011 (r226665) @@ -1,11 +1,21 @@ # $FreeBSD$ +.if ${CC:T:Mclang} != "clang" +FREEBSD_GCC!= ${CC} --version | grep FreeBSD || true +.endif + # # Warning flags for compiling the kernel and components of the kernel: # +.if ${FREEBSD_GCC} +# FreeBSD extensions, not available in upstream GCC +format_extensions= -fformat-extensions +no_align_long_strings= -mno-align-long-strings +.endif + CWARNFLAGS?= -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \ -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \ - -Wundef -Wno-pointer-sign -fformat-extensions \ + -Wundef -Wno-pointer-sign ${format_extensions} \ -Wmissing-include-dirs -fdiagnostics-show-option # # The following flags are next up for working on: @@ -32,7 +42,7 @@ CWARNFLAGS?= -Wall -Wredundant-decls -Wn # .if ${MACHINE_CPUARCH} == "i386" .if ${CC:T:Mclang} != "clang" -CFLAGS+= -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-sse +CFLAGS+= ${no_align_long_strings} -mpreferred-stack-boundary=2 -mno-sse .else CFLAGS+= -mno-aes -mno-avx .endif