Module Name: src
Committed By: joerg
Date: Thu Jun 16 16:39:53 UTC 2011
Modified Files:
src/sys/arch/i386/stand: Makefile.booters Makefile.inc
src/sys/arch/i386/stand/bootxx: Makefile.bootxx
Log Message:
Refactor compiler-specific optimizer flags. Mark bootxx as supported
with clang.
To generate a diff of this commit:
cvs rdiff -u -r1.83 -r1.84 src/sys/arch/i386/stand/Makefile.booters
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/i386/stand/Makefile.inc
cvs rdiff -u -r1.40 -r1.41 src/sys/arch/i386/stand/bootxx/Makefile.bootxx
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/i386/stand/Makefile.booters
diff -u src/sys/arch/i386/stand/Makefile.booters:1.83 src/sys/arch/i386/stand/Makefile.booters:1.84
--- src/sys/arch/i386/stand/Makefile.booters:1.83 Sat Apr 9 00:26:52 2011
+++ src/sys/arch/i386/stand/Makefile.booters Thu Jun 16 16:39:53 2011
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.booters,v 1.83 2011/04/09 00:26:52 joerg Exp $
+# $NetBSD: Makefile.booters,v 1.84 2011/06/16 16:39:53 joerg Exp $
.include <bsd.own.mk>
@@ -23,7 +23,7 @@
.endif
.endif
.endif
-COPTS= -Os -ffreestanding
+COPTS= ${OPT_SIZE.${ACTIVE_CC}}
I386_STAND_DIR?= $S/arch/i386/stand
Index: src/sys/arch/i386/stand/Makefile.inc
diff -u src/sys/arch/i386/stand/Makefile.inc:1.6 src/sys/arch/i386/stand/Makefile.inc:1.7
--- src/sys/arch/i386/stand/Makefile.inc:1.6 Fri Aug 29 00:02:23 2008
+++ src/sys/arch/i386/stand/Makefile.inc Thu Jun 16 16:39:53 2011
@@ -1,5 +1,11 @@
-# $NetBSD: Makefile.inc,v 1.6 2008/08/29 00:02:23 gmcgarry Exp $
+# $NetBSD: Makefile.inc,v 1.7 2011/06/16 16:39:53 joerg Exp $
.include <bsd.own.mk>
BINDIR= /usr/mdec
+
+OPT_SIZE.gcc= -Os -ffreestanding -fomit-frame-pointer
+OPT_SIZE.clang= -Oz -ffreestanding -fomit-frame-pointer \
+ -fno-stack-protector -mno-sse \
+ -mllvm -stack-alignment=4 -mllvm -realign-stack=false \
+ -mllvm -inline-threshold=3 -mllvm -enable-load-pre=false
Index: src/sys/arch/i386/stand/bootxx/Makefile.bootxx
diff -u src/sys/arch/i386/stand/bootxx/Makefile.bootxx:1.40 src/sys/arch/i386/stand/bootxx/Makefile.bootxx:1.41
--- src/sys/arch/i386/stand/bootxx/Makefile.bootxx:1.40 Fri May 20 22:29:55 2011
+++ src/sys/arch/i386/stand/bootxx/Makefile.bootxx Thu Jun 16 16:39:53 2011
@@ -1,9 +1,7 @@
-# $NetBSD: Makefile.bootxx,v 1.40 2011/05/20 22:29:55 joerg Exp $
+# $NetBSD: Makefile.bootxx,v 1.41 2011/06/16 16:39:53 joerg Exp $
S= ${.CURDIR}/../../../../..
-UNSUPPORTED_COMPILER.clang= # defined
-
AFLAGS.bootxx.S= ${${ACTIVE_CC} == "clang":?-no-integrated-as:}
AFLAGS.label.S= ${${ACTIVE_CC} == "clang":?-no-integrated-as:}
AFLAGS.pbr.S= ${${ACTIVE_CC} == "clang":?-no-integrated-as:}
@@ -55,7 +53,8 @@
# CPPFLAGS+= -DBOOT_MSG_COM0
# Make sure we override any optimization options specified by the user
-COPTS= -Os -momit-leaf-frame-pointer
+.include "${.PARSEDIR}/../Makefile.inc"
+COPTS= ${OPT_SIZE.${ACTIVE_CC}}
DBG=
CPPFLAGS+= -DNO_LBA_CHECK
@@ -77,7 +76,6 @@
.endif
.endif
-COPTS+= -ffreestanding
CFLAGS+= -Wall -Wmissing-prototypes -Wstrict-prototypes
CPPFLAGS+= -nostdinc -D_STANDALONE
CPPFLAGS+= -I$S