mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-30 16:51:41 +00:00
Generalize FOO.clang to FOO.${COMPILER_TYPE}. There's no reason these
need to be clang specific. Also generalize things a bit.
This commit is contained in:
parent
7061d0855c
commit
2ded1ea292
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=264932
@ -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" && \
|
||||
|
Loading…
Reference in New Issue
Block a user