From 26a42e7c889509958b8de2012fbf0a22d821d8e6 Mon Sep 17 00:00:00 2001 From: "David E. O'Brien" Date: Thu, 6 Dec 2001 17:53:32 +0000 Subject: [PATCH] Compile all kernels with "-ffreestanding": Assert that compilation takes place in a freestanding environment. This implies `-fno-builtin'. A freestanding environment is one in which the standard library may not exist, and program startup may not necessarily be at main. The most obvious example is an OS kernel. This is equivalent to `-fno-hosted'. --- sys/conf/kern.pre.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk index 17f08b230a1..32a675b28ba 100644 --- a/sys/conf/kern.pre.mk +++ b/sys/conf/kern.pre.mk @@ -37,7 +37,7 @@ INCLUDES+= -I$S/../include INCLUDES+= -I/usr/include .endif -COPTS= ${INCLUDES} ${IDENT} -D_KERNEL -include opt_global.h +COPTS= ${INCLUDES} ${IDENT} -D_KERNEL -ffreestanding -include opt_global.h CFLAGS= ${COPTFLAGS} ${CWARNFLAGS} ${DEBUG} ${COPTS} # XXX LOCORE means "don't declare C stuff" not "for locore.s".