From ddc474a84b36d90b2e9d439d2e2ae425ded27b6e Mon Sep 17 00:00:00 2001 From: Ruslan Ermilov Date: Fri, 28 Feb 2003 22:12:17 +0000 Subject: Initiate the de-orbit burn sequence for . Always use sys/conf/kern.mk when building kernel/modules. is only preserved for sys/boot/pc98/boot2 for now, but this will be fixed. If there are other users of , please let me know. Reminded by: bde --- share/mk/bsd.kern.mk | 62 +++++++--------------------------------------------- 1 file changed, 8 insertions(+), 54 deletions(-) (limited to 'share/mk') diff --git a/share/mk/bsd.kern.mk b/share/mk/bsd.kern.mk index 602fab487c90..e374d5f6fa04 100644 --- a/share/mk/bsd.kern.mk +++ b/share/mk/bsd.kern.mk @@ -1,59 +1,13 @@ # $FreeBSD$ -# -# Warning flags for compiling the kernel and components of the kernel. -# -# Note that the newly added -Wcast-qual is responsible for generating -# most of the remaining warnings. Warnings introduced with -Wall will -# also pop up, but are easier to fix. -CWARNFLAGS?= -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \ - -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \ - -fformat-extensions -ansi -# -# The following flags are next up for working on: -# -W - -# -# 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) -# -.if ${MACHINE_ARCH} == "i386" -CFLAGS+= -mno-align-long-strings -mpreferred-stack-boundary=2 -.endif - -# -# On the alpha, make sure that we don't use floating-point registers and -# allow the use of BWX etc instructions (only needed for low-level i/o). -# Also, reserve register t7 to point at per-cpu global variables. -# -.if ${MACHINE_ARCH} == "alpha" -CFLAGS+= -mno-fp-regs -ffixed-8 -Wa,-mev6 +# Search for kernel source tree in standard places. +.for _dir in ${.CURDIR}/../.. ${.CURDIR}/../../.. ${.CURDIR}/../../../.. /sys /usr/src/sys +.if !defined(SYSDIR) && exists(${_dir}/conf/kern.mk) +SYSDIR= ${_dir} .endif - -# -# For IA-64, we use r13 for the kernel globals pointer and we only use -# a very small subset of float registers for integer divides. -# -.if ${MACHINE_ARCH} == "ia64" -CFLAGS+= -ffixed-r13 -mfixed-range=f32-f127 -mno-sdata -.endif - -# -# For sparc64 we want medlow code model, and we tell gcc to use floating -# point emulation. This avoids using floating point registers for integer -# operations which it has a tendency to do. -# -.if ${MACHINE_ARCH} == "sparc64" -CFLAGS+= -mcmodel=medlow -msoft-float +.endfor +.if !defined(SYSDIR) || !exists(${SYSDIR}/kern) || !exists(${SYSDIR}/conf/) +.error "can't find kernel source tree" .endif -# -# GCC 3.0 and above like to do certain optimizations based on the -# assumption that the program is linked against libc. Stop this. -# -CFLAGS+= -ffreestanding +.include "${SYSDIR}/conf/kern.mk" -- cgit v1.2.3