Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/conf Do not use -Wreturn-type with gcc 2.95.x



details:   https://anonhg.NetBSD.org/src/rev/a19f744c5082
branches:  trunk
changeset: 582149:a19f744c5082
user:      martin <martin%NetBSD.org@localhost>
date:      Sat Jun 18 22:56:02 2005 +0000

description:
Do not use -Wreturn-type with gcc 2.95.x

diffstat:

 sys/conf/Makefile.kern.inc |  9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diffs (37 lines):

diff -r f775fb668060 -r a19f744c5082 sys/conf/Makefile.kern.inc
--- a/sys/conf/Makefile.kern.inc        Sat Jun 18 21:25:14 2005 +0000
+++ b/sys/conf/Makefile.kern.inc        Sat Jun 18 22:56:02 2005 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.kern.inc,v 1.67 2005/06/07 18:11:34 sjg Exp $
+#      $NetBSD: Makefile.kern.inc,v 1.68 2005/06/18 22:56:02 martin Exp $
 #
 # This file contains common `MI' targets and definitions and it is included
 # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}.
@@ -54,6 +54,7 @@
 ##
 ## CPPFLAGS, CFLAGS, and AFLAGS must be set in the port's Makefile
 ##
+_ISGCC295!=            ${CC} --version 2>/dev/null | grep 2.95 2>/dev/null || echo 0
 INCLUDES?=     -I. ${EXTRA_INCLUDES} -I$S/arch -I$S -nostdinc
 CPPFLAGS+=     ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -D_KERNEL_OPT
 DEFCOPTS?=     -O2
@@ -66,7 +67,10 @@
 .endif
 CWARNFLAGS+=   -Wall -Wno-main -Wno-format-zero-length -Wpointer-arith
 CWARNFLAGS+=   -Wmissing-prototypes -Wstrict-prototypes
-CWARNFLAGS+=   -Wreturn-type -Wswitch -Wshadow
+.if !${_ISGCC295}
+CWARNFLAGS+=   -Wreturn-type
+.endif
+CWARNFLAGS+=   -Wswitch -Wshadow
 CWARNFLAGS+=   -Wcast-qual -Wwrite-strings
 # Add -Wno-sign-compare.  -Wsign-compare is included in -Wall as of GCC 3.3,
 # but our sources aren't up for it yet.
@@ -78,7 +82,6 @@
 AFLAGS+=       ${CPUFLAGS} -D_LOCORE
 
 # Disable unitialized warnings with 2.95 - it gets it wrong way too often
-_ISGCC295!=            ${CC} --version 2>/dev/null | grep 2.95 2>/dev/null || echo 0
 .if ${_ISGCC295}
 CWARNFLAGS+=   -Wno-uninitialized
 .else



Home | Main Index | Thread Index | Old Index