Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/i386/stand Refactor compiler-specific optimizer fla...



details:   https://anonhg.NetBSD.org/src/rev/075379d5a4ae
branches:  trunk
changeset: 766135:075379d5a4ae
user:      joerg <joerg%NetBSD.org@localhost>
date:      Thu Jun 16 16:39:53 2011 +0000

description:
Refactor compiler-specific optimizer flags. Mark bootxx as supported
with clang.

diffstat:

 sys/arch/i386/stand/Makefile.booters       |  4 ++--
 sys/arch/i386/stand/Makefile.inc           |  8 +++++++-
 sys/arch/i386/stand/bootxx/Makefile.bootxx |  8 +++-----
 3 files changed, 12 insertions(+), 8 deletions(-)

diffs (66 lines):

diff -r 55105a5cf913 -r 075379d5a4ae sys/arch/i386/stand/Makefile.booters
--- a/sys/arch/i386/stand/Makefile.booters      Thu Jun 16 16:39:14 2011 +0000
+++ b/sys/arch/i386/stand/Makefile.booters      Thu Jun 16 16:39:53 2011 +0000
@@ -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
 
diff -r 55105a5cf913 -r 075379d5a4ae sys/arch/i386/stand/Makefile.inc
--- a/sys/arch/i386/stand/Makefile.inc  Thu Jun 16 16:39:14 2011 +0000
+++ b/sys/arch/i386/stand/Makefile.inc  Thu Jun 16 16:39:53 2011 +0000
@@ -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
diff -r 55105a5cf913 -r 075379d5a4ae sys/arch/i386/stand/bootxx/Makefile.bootxx
--- a/sys/arch/i386/stand/bootxx/Makefile.bootxx        Thu Jun 16 16:39:14 2011 +0000
+++ b/sys/arch/i386/stand/bootxx/Makefile.bootxx        Thu Jun 16 16:39:53 2011 +0000
@@ -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



Home | Main Index | Thread Index | Old Index