From 51626c2003d90f680be54ebc28d497f212bcebe8 Mon Sep 17 00:00:00 2001 From: Yoshihiro Takahashi Date: Mon, 15 Oct 2007 14:20:24 +0000 Subject: [PATCH] Optimize for size on pc98. It enables to boot a kernel again. I don't know what's wrong (loader, boot2 or others), but this change is effective. Tested by: NAKAJI Hiroyuki MFC after: 3 days --- lib/libstand/Makefile | 3 +++ sys/boot/ficl/Makefile | 2 +- sys/boot/pc98/Makefile.inc | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/libstand/Makefile b/lib/libstand/Makefile index a06cf514cd02..c2fc7a4f7091 100644 --- a/lib/libstand/Makefile +++ b/lib/libstand/Makefile @@ -22,6 +22,9 @@ CFLAGS+= -mno-mmx -mno-3dnow -mno-sse -mno-sse2 .if ${MACHINE_ARCH} == "i386" CFLAGS+= -mno-sse3 .endif +.if ${MACHINE} == "pc98" +CFLAGS+= -Os +.endif .if ${MACHINE_ARCH} == "powerpc" CFLAGS+= -msoft-float -D_STANDALONE .endif diff --git a/sys/boot/ficl/Makefile b/sys/boot/ficl/Makefile index a1cc45b4202f..f8f629298f7e 100644 --- a/sys/boot/ficl/Makefile +++ b/sys/boot/ficl/Makefile @@ -18,7 +18,7 @@ CFLAGS+= -mno-sse3 CFLAGS+= -msoft-float .endif .if ${MACHINE} == "pc98" -CFLAGS+= -DPC98 +CFLAGS+= -Os -DPC98 .endif .if HAVE_PNP CFLAGS+= -DHAVE_PNP diff --git a/sys/boot/pc98/Makefile.inc b/sys/boot/pc98/Makefile.inc index 379dae33f4c8..5bdddeeaa5c1 100644 --- a/sys/boot/pc98/Makefile.inc +++ b/sys/boot/pc98/Makefile.inc @@ -6,7 +6,8 @@ BINDIR?= /boot LOADER_ADDRESS?=0x100000 CFLAGS+= -ffreestanding -mpreferred-stack-boundary=2 \ - -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 + -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 \ + -Os LDFLAGS+= -nostdlib # BTX components