Add an alternative to NOGCCERROR for clang.
This commit is contained in:
parent
56a416ee80
commit
70e887f5ec
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: bsd.README,v 1.282 2011/05/20 16:02:23 plunky Exp $
|
||||
# $NetBSD: bsd.README,v 1.283 2011/05/30 13:47:01 joerg Exp $
|
||||
# @(#)bsd.README 8.2 (Berkeley) 4/2/94
|
||||
|
||||
This is the README file for the make "include" files for the NetBSD
|
||||
|
@ -1623,6 +1623,9 @@ NOGCCERROR If defined, prevents passing certain ${CFLAGS} to GCC
|
|||
-Werror -Wa,--fatal-warnings
|
||||
(The latter being for as(1).)
|
||||
|
||||
NOCLANGERROR If defined and clang is used as C compiler, -Werror is not
|
||||
passed to it.
|
||||
|
||||
WARNS Crank up GCC warning options; the distinct levels are:
|
||||
WARNS=1
|
||||
WARNS=2
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: bsd.sys.mk,v 1.201 2011/05/26 12:56:30 joerg Exp $
|
||||
# $NetBSD: bsd.sys.mk,v 1.202 2011/05/30 13:47:01 joerg Exp $
|
||||
#
|
||||
# Build definitions used for NetBSD source tree builds.
|
||||
|
||||
|
@ -65,7 +65,8 @@ CFLAGS+= ${${ACTIVE_CC} == "clang":? -Wpointer-sign :}
|
|||
CWARNFLAGS+= ${CWARNFLAGS.${ACTIVE_CC}}
|
||||
|
||||
CPPFLAGS+= ${AUDIT:D-D__AUDIT__}
|
||||
CFLAGS+= ${CWARNFLAGS} ${NOGCCERROR:D:U-Werror}
|
||||
_NOWERROR= ${defined(NOGCCERROR) || (${ACTIVE_CC} == "clang" && defined(NOCLANGERROR)):?yes:no}
|
||||
CFLAGS+= ${CWARNFLAGS} ${${_NOWERROR} == "no" :?-Werror:}
|
||||
LINTFLAGS+= ${DESTDIR:D-d ${DESTDIR}/usr/include}
|
||||
|
||||
.if (${MACHINE_ARCH} == "alpha") || \
|
||||
|
|
Loading…
Reference in New Issue