--- src/sys/conf/bsd.kern.mk 2006/03/24 18:35:28 1.7 +++ src/sys/conf/bsd.kern.mk 2006/07/02 00:55:08 1.8 @@ -8,15 +8,9 @@ # most of the remaining warnings. Warnings introduced with -Wall will # also pop up, but are easier to fix. # -.if ${CCVER} == "gcc2" -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 \ -ansi -.endif # # The following flags are next up for working on: # -W @@ -25,33 +19,6 @@ CWARNFLAGS?= -Wall -Wredundant-decls -Wn # of material assistance. # -# -# On the i386, do not align the stack to 16-byte boundaries. Otherwise GCC -# 2.95 adds code to the entry and exit point of every function to align the -# stack to 16-byte boundaries -- thus wasting approximately 12 bytes of stack -# per function call. While the 16-byte alignment may benefit micro benchmarks, -# it is probably an overall loss as it makes the code bigger (less efficient -# use of code cache tag lines) and uses more stack (less efficient use of data -# cache tag lines) -# -# Prohibit the use of FP registers in the kernel. The user FP state is -# only saved and restored under strictly managed conditions and mainline -# kernel code cannot safely use the FP system. -# -.if ${MACHINE_ARCH} == "i386" -CFLAGS+= -mpreferred-stack-boundary=2 -CFLAGS+= -fno-stack-protector -CFLAGS+= -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -.endif - -# -# On the alpha, make sure that we don't use floating-point registers and -# allow the use of EV56 instructions (only needed for low-level i/o). -# -.if ${MACHINE_ARCH} == "alpha" -CFLAGS+= -mno-fp-regs -Wa,-mev56 -.endif - # Require the proper use of 'extern' for variables. -fno-common will # cause duplicate declarations to generate a link error. # @@ -60,3 +27,5 @@ CFLAGS+= -fno-common # Prevent GCC 3.x from making certain libc based inline optimizations # CFLAGS+= -ffreestanding + +.include "kern-${MACHINE_ARCH}.mk"