From 58c4a9b5f49bef6743846b4b402f43862353f2bf Mon Sep 17 00:00:00 2001 From: Ben Gras Date: Fri, 12 Aug 2011 20:59:23 +0000 Subject: [PATCH] kernel: don't use -ffreestanding . workaround for clang's stdint.h __STDC_HOSTED__ test that causes the host stdint.h to be ignored for -ffreestanding, causing a type to be double-defined in the kernel --- kernel/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/Makefile b/kernel/Makefile index d67c683e6..1b760c86e 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -21,7 +21,7 @@ CFLAGS += -D__kernel__ .if ${COMPILER_TYPE} == "ack" LDFLAGS+= -.o .elif ${COMPILER_TYPE} == "gnu" -CPPFLAGS+= -ffreestanding -fno-stack-protector -D_NETBSD_SOURCE +CPPFLAGS+= -fno-stack-protector -D_NETBSD_SOURCE LDFLAGS+= -T ${.CURDIR}/arch/${ARCH}/kernel.lds LDFLAGS+= -nostdlib -L${LIBDIR} LDADD+= -lminlib -- 2.44.0