Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Apr 2014 19:25:58 +0000 (UTC)
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r264932 - head/share/mk
Message-ID:  <201404251925.s3PJPwM3098757@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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" && \



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201404251925.s3PJPwM3098757>