diff options
author | Warner Losh <imp@FreeBSD.org> | 2014-04-25 19:25:57 +0000 |
---|---|---|
committer | Warner Losh <imp@FreeBSD.org> | 2014-04-25 19:25:57 +0000 |
commit | 2ded1ea2928d5b0b785c4255ed0dc9197e1ee9e6 (patch) | |
tree | 685f9360c5fb411e2df4e4ccff959f43efd3d5a5 | |
parent | 7061d0855c8e289a505080d2be4c7d65c4dde78f (diff) | |
download | src-2ded1ea2928d5b0b785c4255ed0dc9197e1ee9e6.tar.gz src-2ded1ea2928d5b0b785c4255ed0dc9197e1ee9e6.zip |
Generalize FOO.clang to FOO.${COMPILER_TYPE}. There's no reason these
need to be clang specific. Also generalize things a bit.
Notes
Notes:
svn path=/head/; revision=264932
-rw-r--r-- | share/mk/bsd.sys.mk | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk index 3428edc65972..c94ca611b088 100644 --- a/share/mk/bsd.sys.mk +++ b/share/mk/bsd.sys.mk @@ -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 -Wstrict-prototypes\ .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-extra-args 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" && \ |