Module Name:    src
Committed By:   uwe
Date:           Fri Jul  8 20:59:53 UTC 2011

Modified Files:
        src/share/mk: bsd.sys.mk

Log Message:
Augment previous.  Use -Wno-uninitialized for sh3 in general, not just
dreamcast.  The problem is not sh3 per-se, but the fact that for sh3
we use -Os by default.  That causes false positives since gcc doesn't
detect that e.g. a variable is set and used under the same condition
in different "if" statements.

XXX: This should probably check for optimization level instead,
though, for all I know, phase of moon might be a contributing cause
too.

XXX2: MACHINE_CPU is set in bsd.own.mk and is not available here, so
we have to spell the test in terms of MACHINE_ARCH.


To generate a diff of this commit:
cvs rdiff -u -r1.206 -r1.207 src/share/mk/bsd.sys.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/mk/bsd.sys.mk
diff -u src/share/mk/bsd.sys.mk:1.206 src/share/mk/bsd.sys.mk:1.207
--- src/share/mk/bsd.sys.mk:1.206	Fri Jul  8 03:29:52 2011
+++ src/share/mk/bsd.sys.mk	Fri Jul  8 20:59:53 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.sys.mk,v 1.206 2011/07/08 03:29:52 mrg Exp $
+#	$NetBSD: bsd.sys.mk,v 1.207 2011/07/08 20:59:53 uwe Exp $
 #
 # Build definitions used for NetBSD source tree builds.
 
@@ -63,8 +63,10 @@
 CFLAGS+=	-Wsign-compare
 CFLAGS+=	${${ACTIVE_CC} == "clang":? -Wpointer-sign :}
 .endif
-.if defined(HAVE_GCC) && ${HAVE_GCC} == 45 && ${MACHINE} == "dreamcast"
-# XXX GCC 4.5 for dreamcast is extra noisy for cases it should be better with
+.if (defined(HAVE_GCC) && ${HAVE_GCC} == 45 \
+     && (${MACHINE_ARCH} == "sh3eb" || ${MACHINE_ARCH} == "sh3el"))
+# XXX GCC 4.5 for sh3 (which we compile with -Os) is extra noisy for
+# cases it should be better with
 CFLAGS+=	-Wno-uninitialized
 .endif
 .endif

Reply via email to