From b3c3a1cb1ea1f906c38dbd5744645eeda8ca0eb0 Mon Sep 17 00:00:00 2001 From: Ben Gras Date: Tue, 31 Aug 2010 16:42:44 +0000 Subject: [PATCH] gcc compiles - add -fno-builtin so that gcc optimisations don't break things. - kernel compile was broken with gcc as putchar() was added by gcc in stacktrace.c - add -fno-builtin everywhere to avoid such problems in the future - -fno-builtin in kernel now redundant --- kernel/Makefile | 2 +- share/mk/bsd.gcc.mk | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/Makefile b/kernel/Makefile index ae199c5ec..4a3d3160f 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -15,7 +15,7 @@ LDADD+= -ltimers -lsys .if ${COMPILER_TYPE} == "ack" LDFLAGS+= -.o .elif ${COMPILER_TYPE} == "gnu" -CPPFLAGS+= -fno-builtin -ffreestanding -fno-stack-protector +CPPFLAGS+= -ffreestanding -fno-stack-protector LDFLAGS+= -T arch/${ARCH}/kernel.lds LDFLAGS+= -nostdlib -L/usr/gnu/lib CFLAGS+=-march=i386 diff --git a/share/mk/bsd.gcc.mk b/share/mk/bsd.gcc.mk index 3a2b0185d..6554b76e2 100644 --- a/share/mk/bsd.gcc.mk +++ b/share/mk/bsd.gcc.mk @@ -1 +1,2 @@ AFLAGS+=-D__ASSEMBLY__ -D_EM_WSIZE=4 -D__minix +CFLAGS+= -fno-builtin -- 2.44.0