From ddc474a84b36d90b2e9d439d2e2ae425ded27b6e Mon Sep 17 00:00:00 2001 From: Ruslan Ermilov Date: Fri, 28 Feb 2003 22:12:17 +0000 Subject: [PATCH] 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 | 64 ++++++------------------------------------- sys/conf/kern.post.mk | 2 +- sys/conf/kmod.mk | 2 +- 3 files changed, 11 insertions(+), 57 deletions(-) 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 +# 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 +.endfor +.if !defined(SYSDIR) || !exists(${SYSDIR}/kern) || !exists(${SYSDIR}/conf/) +.error "can't find kernel source tree" .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 -.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 -.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" diff --git a/sys/conf/kern.post.mk b/sys/conf/kern.post.mk index c7f212b27494..68fd9705fb31 100644 --- a/sys/conf/kern.post.mk +++ b/sys/conf/kern.post.mk @@ -221,4 +221,4 @@ majors.c: $S/conf/majors $S/conf/majors.awk majors.o: ${NORMAL_C} -.include +.include "kern.mk" diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk index f1e3c6cd6dde..1c0369de227e 100644 --- a/sys/conf/kmod.mk +++ b/sys/conf/kmod.mk @@ -309,4 +309,4 @@ ${OBJS}: ${SRCS:M*.h} .endif .include -.include +.include "kern.mk"