Add a CXXWARNFLAGS variable
Some warning flags are valid for C++ but not C. GCC 8 complains if you pass such flags when building a C file. Using a separate variable for these flags allows building both C and C++ files in the same directory (such as the fusefs tests) under GCC. Reviewed by: cem, emaste MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D21116
This commit is contained in:
parent
305b9efefc
commit
6b184f622a
@ -234,6 +234,8 @@ DEBUG_FILES_CFLAGS?= -g
|
||||
.if ${MK_WARNS} != "no"
|
||||
CFLAGS+= ${CWARNFLAGS:M*} ${CWARNFLAGS.${COMPILER_TYPE}}
|
||||
CFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}}
|
||||
CXXFLAGS+= ${CXXWARNFLAGS:M*} ${CXXWARNFLAGS.${COMPILER_TYPE}}
|
||||
CXXFLAGS+= ${CXXWARNFLAGS.${.IMPSRC:T}}
|
||||
.endif
|
||||
|
||||
CFLAGS+= ${CFLAGS.${COMPILER_TYPE}}
|
||||
|
Loading…
x
Reference in New Issue
Block a user