summaryrefslogtreecommitdiffstats
path: root/share/mk
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2003-02-28 22:12:17 +0000
committerru <ru@FreeBSD.org>2003-02-28 22:12:17 +0000
commitd8e63f1764fcc7147ec163e0f31c38fe13ca6d95 (patch)
treea07748e2eddd0e1ae5ad7377516d9477ba7eeb76 /share/mk
parent0ad15c51502089a0a989cc5cad217b2c05f49eb3 (diff)
downloadFreeBSD-src-d8e63f1764fcc7147ec163e0f31c38fe13ca6d95.zip
FreeBSD-src-d8e63f1764fcc7147ec163e0f31c38fe13ca6d95.tar.gz
Initiate the de-orbit burn sequence for <bsd.kern.mk>.
Always use sys/conf/kern.mk when building kernel/modules. <bsd.kern.mk> is only preserved for sys/boot/pc98/boot2 for now, but this will be fixed. If there are other users of <bsd.kern.mk>, please let me know. Reminded by: bde
Diffstat (limited to 'share/mk')
-rw-r--r--share/mk/bsd.kern.mk62
1 files changed, 8 insertions, 54 deletions
diff --git a/share/mk/bsd.kern.mk b/share/mk/bsd.kern.mk
index 602fab4..e374d5f 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"
OpenPOWER on IntegriCloud