From owner-svn-src-head@FreeBSD.ORG Fri Apr 25 19:25:58 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7CE1067F; Fri, 25 Apr 2014 19:25:58 +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 5242D1C65; Fri, 25 Apr 2014 19:25:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3PJPwH0098758; Fri, 25 Apr 2014 19:25:58 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3PJPwM3098757; Fri, 25 Apr 2014 19:25:58 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201404251925.s3PJPwM3098757@svn.freebsd.org> From: Warner Losh Date: Fri, 25 Apr 2014 19:25:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r264932 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Apr 2014 19:25:58 -0000 Author: imp Date: Fri Apr 25 19:25:57 2014 New Revision: 264932 URL: http://svnweb.freebsd.org/changeset/base/264932 Log: Generalize FOO.clang to FOO.${COMPILER_TYPE}. There's no reason these need to be clang specific. Also generalize things a bit. Modified: head/share/mk/bsd.sys.mk Modified: head/share/mk/bsd.sys.mk ============================================================================== --- head/share/mk/bsd.sys.mk Fri Apr 25 19:25:53 2014 (r264931) +++ head/share/mk/bsd.sys.mk Fri Apr 25 19:25:57 2014 (r264932) @@ -30,10 +30,9 @@ CFLAGS+= -std=${CSTD} .if defined(WARNS) .if ${WARNS} >= 1 CWARNFLAGS+= -Wsystem-headers -.if !defined(NO_WERROR) && (${COMPILER_TYPE} != "clang" \ - || !defined(NO_WERROR.clang)) +.if !defined(NO_WERROR) && !defined(NO_WERROR.${COMPILER_TYPE}) CWARNFLAGS+= -Werror -.endif # !NO_WERROR && (!CLANG || !NO_WERROR.clang) +.endif # !NO_WERROR && !NO_WERROR.${COMPILER_TYPE} .endif # WARNS >= 1 .if ${WARNS} >= 2 CWARNFLAGS+= -Wall -Wno-format-y2k @@ -45,10 +44,9 @@ CWARNFLAGS+= -W -Wno-unused-parameter -W .if ${WARNS} >= 4 CWARNFLAGS+= -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow\ -Wunused-parameter -.if !defined(NO_WCAST_ALIGN) && (${COMPILER_TYPE} != "clang" \ - || !defined(NO_WCAST_ALIGN.clang)) +.if !defined(NO_WCAST_ALIGN) && !defined(NO_WCAST_ALIGN.${COMPILER_TYPE}) CWARNFLAGS+= -Wcast-align -.endif # !NO_WCAST_ALIGN && (!CLANG || !NO_WCAST_ALIGN.clang) +.endif # !NO_WCAST_ALIGN !NO_WCAST_ALIGN.${COMPILER_TYPE} .endif # WARNS >= 4 # BDECFLAGS .if ${WARNS} >= 6 @@ -99,15 +97,14 @@ CWARNFLAGS+= -Wformat=2 -Wno-format-extr CWARNFLAGS+= -Wno-format-nonliteral .endif # WARNS <= 3 .endif # CLANG -.if !defined(NO_WERROR) && (${COMPILER_TYPE} != "clang" \ - || !defined(NO_WERROR.clang)) +.if !defined(NO_WERROR) && !defined(NO_WERROR.${COMPILER_TYPE}) CWARNFLAGS+= -Werror -.endif # !NO_WERROR && (!CLANG || !NO_WERROR.clang) +.endif # !NO_WERROR && !NO_WERROR.${COMPILER_TYPE} .endif # WFORMAT > 0 .endif # WFORMAT -.if defined(NO_WFORMAT) || (${COMPILER_TYPE} == "clang" && defined(NO_WFORMAT.clang)) +.if defined(NO_WFORMAT) || defined(NO_WFORMAT.${COMPILER_TYPE}) CWARNFLAGS+= -Wno-format -.endif # NO_WFORMAT || (CLANG && NO_WFORMAT.clang) +.endif # NO_WFORMAT || NO_WFORMAT.${COMPILER_TYPE} .endif # !NO_WARNS .if defined(IGNORE_PRAGMA) @@ -130,13 +127,9 @@ CFLAGS+= -fno-dwarf2-cfi-asm # Eventually we'll want to start building the base system C++ code as C++11, # but not yet. CXXFLAGS+= -Wno-c++11-extensions -CFLAGS+= ${CFLAGS.clang} -CXXFLAGS+= ${CXXFLAGS.clang} -.else # !CLANG -GCC_MS_EXTENSIONS= -fms-extensions -CFLAGS+= ${CFLAGS.gcc} -CXXFLAGS+= ${CXXFLAGS.gcc} .endif # CLANG +CFLAGS+= ${CFLAGS.${COMPILER_TYPE}} +CXXFLAGS+= ${CXXFLAGS.${COMPILER_TYPE}} .endif # !EARLY_BUILD .if ${MK_SSP} != "no" && ${MACHINE_CPUARCH} != "ia64" && \