This will have to be revised, but allow putting 'makeoptions GCC3=true'

in a kernel config file.  This should minimize the tearing-out-hair process
while updating the kernel for gcc-3 compliance.
This commit is contained in:
Peter Wemm 2001-09-10 06:23:33 +00:00
parent eb30c1c0b9
commit ea8f3ee347
2 changed files with 30 additions and 0 deletions

View File

@ -7,9 +7,16 @@
# most of the remaining warnings. Warnings introduced with -Wall will
# also pop up, but are easier to fix.
#
# XXX FIXME - revert when there is a gcc3 with -fformat-extensions
.ifndef GCC3
CWARNFLAGS?= -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \
-Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \
-fformat-extensions -ansi
.else
CWARNFLAGS?= -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \
-Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \
-Wno-format -ansi
.endif
#
# The following flags are next up for working on:
# -W
@ -47,3 +54,11 @@ CFLAGS+= -mno-fp-regs -ffixed-8 -Wa,-mev56
.if ${MACHINE_ARCH} == "ia64"
CFLAGS+= -ffixed-r13 -mfixed-range=f32-f127
.endif
#
# GCC 3.0 and above like to do certain optimizations based on the
# assumption that the program is linked against libc. Stop this.
#
.ifdef GCC3
CFLAGS+= -ffreestanding
.endif

View File

@ -7,9 +7,16 @@
# most of the remaining warnings. Warnings introduced with -Wall will
# also pop up, but are easier to fix.
#
# XXX FIXME - revert when there is a gcc3 with -fformat-extensions
.ifndef GCC3
CWARNFLAGS?= -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \
-Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \
-fformat-extensions -ansi
.else
CWARNFLAGS?= -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \
-Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \
-Wno-format -ansi
.endif
#
# The following flags are next up for working on:
# -W
@ -47,3 +54,11 @@ CFLAGS+= -mno-fp-regs -ffixed-8 -Wa,-mev56
.if ${MACHINE_ARCH} == "ia64"
CFLAGS+= -ffixed-r13 -mfixed-range=f32-f127
.endif
#
# GCC 3.0 and above like to do certain optimizations based on the
# assumption that the program is linked against libc. Stop this.
#
.ifdef GCC3
CFLAGS+= -ffreestanding
.endif