Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/share/mk Add an alternative to NOGCCERROR for clang.
details: https://anonhg.NetBSD.org/src/rev/008e689720f1
branches: trunk
changeset: 765548:008e689720f1
user: joerg <joerg%NetBSD.org@localhost>
date: Mon May 30 13:47:01 2011 +0000
description:
Add an alternative to NOGCCERROR for clang.
diffstat:
share/mk/bsd.README | 5 ++++-
share/mk/bsd.sys.mk | 5 +++--
2 files changed, 7 insertions(+), 3 deletions(-)
diffs (38 lines):
diff -r c9c309d8432e -r 008e689720f1 share/mk/bsd.README
--- a/share/mk/bsd.README Mon May 30 13:10:38 2011 +0000
+++ b/share/mk/bsd.README Mon May 30 13:47:01 2011 +0000
@@ -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 @@
-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
diff -r c9c309d8432e -r 008e689720f1 share/mk/bsd.sys.mk
--- a/share/mk/bsd.sys.mk Mon May 30 13:10:38 2011 +0000
+++ b/share/mk/bsd.sys.mk Mon May 30 13:47:01 2011 +0000
@@ -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 @@
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") || \
Home |
Main Index |
Thread Index |
Old Index