Tue Aug 9 13:02:53 2011 UTC ()
Restrict -Wno-array-bounds to tulip.c with gcc.


(joerg)
diff -r1.143 -r1.144 src/sys/conf/Makefile.kern.inc

cvs diff -r1.143 -r1.144 src/sys/conf/Makefile.kern.inc (expand / switch to unified diff)

--- src/sys/conf/Makefile.kern.inc 2011/07/28 13:42:16 1.143
+++ src/sys/conf/Makefile.kern.inc 2011/08/09 13:02:53 1.144
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: Makefile.kern.inc,v 1.143 2011/07/28 13:42:16 uebayasi Exp $ 1# $NetBSD: Makefile.kern.inc,v 1.144 2011/08/09 13:02:53 joerg Exp $
2# 2#
3# This file contains common `MI' targets and definitions and it is included 3# This file contains common `MI' targets and definitions and it is included
4# at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}. 4# at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}.
5# 5#
6# Each target in this file should be protected with `if !target(target)' 6# Each target in this file should be protected with `if !target(target)'
7# or `if !commands(target)' and each variable should only be conditionally 7# or `if !commands(target)' and each variable should only be conditionally
8# assigned `VAR ?= VALUE', so that everything can be overriden. 8# assigned `VAR ?= VALUE', so that everything can be overriden.
9# 9#
10# DEBUG is set to -g if debugging. 10# DEBUG is set to -g if debugging.
11# PROF is set to -pg if profiling. 11# PROF is set to -pg if profiling.
12# 12#
13# To specify debugging, add the config line: makeoptions DEBUG="-g" 13# To specify debugging, add the config line: makeoptions DEBUG="-g"
14# A better way is to specify -g only for a few files. 14# A better way is to specify -g only for a few files.
@@ -71,27 +71,27 @@ CWARNFLAGS+= -Wno-unreachable-code @@ -71,27 +71,27 @@ CWARNFLAGS+= -Wno-unreachable-code
71. if defined(HAVE_GCC) || defined(HAVE_PCC) 71. if defined(HAVE_GCC) || defined(HAVE_PCC)
72CWARNFLAGS+= -Wno-pointer-sign -Wno-attributes 72CWARNFLAGS+= -Wno-pointer-sign -Wno-attributes
73. if ${MACHINE} == "i386" || ${MACHINE_ARCH} == "x86_64" || \ 73. if ${MACHINE} == "i386" || ${MACHINE_ARCH} == "x86_64" || \
74 ${MACHINE_ARCH} == "sparc64" || ${MACHINE} == "prep" 74 ${MACHINE_ARCH} == "sparc64" || ${MACHINE} == "prep"
75CWARNFLAGS+= -Wextra -Wno-unused-parameter 75CWARNFLAGS+= -Wextra -Wno-unused-parameter
76. endif 76. endif
77. endif 77. endif
78# Add -Wno-sign-compare. -Wsign-compare is included in -Wall as of GCC 3.3, 78# Add -Wno-sign-compare. -Wsign-compare is included in -Wall as of GCC 3.3,
79# but our sources aren't up for it yet. 79# but our sources aren't up for it yet.
80CWARNFLAGS+= -Wno-sign-compare 80CWARNFLAGS+= -Wno-sign-compare
81.endif 81.endif
82 82
83CWARNFLAGS.clang+= -Wno-unknown-pragmas -Wno-conversion \ 83CWARNFLAGS.clang+= -Wno-unknown-pragmas -Wno-conversion \
84 -Wno-self-assign -Wno-array-bounds 84 -Wno-self-assign
85 85
86CFLAGS+= -ffreestanding -fno-zero-initialized-in-bss 86CFLAGS+= -ffreestanding -fno-zero-initialized-in-bss
87CFLAGS+= ${DEBUG} ${COPTS} 87CFLAGS+= ${DEBUG} ${COPTS}
88AFLAGS+= -D_LOCORE -Wa,--fatal-warnings 88AFLAGS+= -D_LOCORE -Wa,--fatal-warnings
89 89
90# XXX 90# XXX
91.if defined(HAVE_GCC) 91.if defined(HAVE_GCC)
92CFLAGS+= -fno-strict-aliasing 92CFLAGS+= -fno-strict-aliasing
93.endif 93.endif
94 94
95.if ${USE_SSP:Uno} == "yes" 95.if ${USE_SSP:Uno} == "yes"
96COPTS.kern_ssp.c+= -fno-stack-protector -D__SSP__ 96COPTS.kern_ssp.c+= -fno-stack-protector -D__SSP__
97.endif 97.endif
@@ -508,27 +508,27 @@ EXTRA_CLEAN+= .gdbinit @@ -508,27 +508,27 @@ EXTRA_CLEAN+= .gdbinit
508VARSTACK=kern/uipc_socket.c miscfs/genfs/genfs_vnops.c \ 508VARSTACK=kern/uipc_socket.c miscfs/genfs/genfs_vnops.c \
509 nfs/nfs_bio.c uvm/uvm_bio.c \ 509 nfs/nfs_bio.c uvm/uvm_bio.c \
510 uvm/uvm_pager.c dev/ic/aic7xxx.c dev/ic/aic79xx.c arch/xen/i386/gdt.c \ 510 uvm/uvm_pager.c dev/ic/aic7xxx.c dev/ic/aic79xx.c arch/xen/i386/gdt.c \
511 dev/ofw/ofw_subr.c 511 dev/ofw/ofw_subr.c
512 512
513.if defined(HAVE_GCC) || defined(HAVE_PCC) 513.if defined(HAVE_GCC) || defined(HAVE_PCC)
514.for __varstack in ${VARSTACK} 514.for __varstack in ${VARSTACK}
515COPTS.${__varstack:T} += -Wno-stack-protector 515COPTS.${__varstack:T} += -Wno-stack-protector
516.endfor 516.endfor
517.endif 517.endif
518 518
519# XXX ugly ugly to fix 519# XXX ugly ugly to fix
520.if defined(HAVE_GCC) && ${HAVE_GCC} == 45 520.if defined(HAVE_GCC) && ${HAVE_GCC} == 45
521CWARNFLAGS.tulip.c+= -Wno-array-bounds 521CWARNFLAGS.tulip.c+= ${${ACTIVE_CC} == "gcc":?-Wno-array-bounds:}
522CWARNFLAGS.radeonfb.c+= -Wno-cast-qual 522CWARNFLAGS.radeonfb.c+= -Wno-cast-qual
523CWARNFLAGS.dbcool.c+= -Wno-cast-qual 523CWARNFLAGS.dbcool.c+= -Wno-cast-qual
524CWARNFLAGS.adb_kbd.c+= -Wno-cast-qual 524CWARNFLAGS.adb_kbd.c+= -Wno-cast-qual
525CWARNFLAGS.adb_ms.c+= -Wno-cast-qual 525CWARNFLAGS.adb_ms.c+= -Wno-cast-qual
526.endif 526.endif
527 527
528AFLAGS+= ${AOPTS.${.IMPSRC:T}} 528AFLAGS+= ${AOPTS.${.IMPSRC:T}}
529CFLAGS+= ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} 529CFLAGS+= ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}}
530CPPFLAGS+= ${CPPFLAGS.${.IMPSRC:T}} 530CPPFLAGS+= ${CPPFLAGS.${.IMPSRC:T}}
531CWARNFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}} 531CWARNFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}}
532 532
533.include <bsd.files.mk> 533.include <bsd.files.mk>
534 534