summaryrefslogtreecommitdiff
path: root/distrib
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2010-05-24 19:10:27 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2010-05-24 19:10:27 +0000
commitb907521f8dfa00b2c9b89a4d565287210a53cc84 (patch)
treeed4a1f3266d809edd1e27bd147d77517e73b3c5f /distrib
parentaf8faf643f9dfe2fc4ef89d7c4aa6df213ecb386 (diff)
Use -mtune=i486 when running with gcc4, the larger weights given
to various instructions gives code which gzips better. ok deraadt@
Diffstat (limited to 'distrib')
-rw-r--r--distrib/i386/common/Makefile.inc9
1 files changed, 7 insertions, 2 deletions
diff --git a/distrib/i386/common/Makefile.inc b/distrib/i386/common/Makefile.inc
index 854a8175065..3b46045f3fe 100644
--- a/distrib/i386/common/Makefile.inc
+++ b/distrib/i386/common/Makefile.inc
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.inc,v 1.25 2009/04/17 15:59:48 deraadt Exp $
+# $OpenBSD: Makefile.inc,v 1.26 2010/05/24 19:10:26 jsg Exp $
TOP= ${.CURDIR}/..
@@ -52,6 +52,11 @@ NBLKS?= 3800
# minfree, opt, b/i, blks/cyl
NEWFSARGS= -m 0 -o space -i 4096
+COPTS= -Os
+.if ${COMPILER_VERSION:L} == "gcc4"
+COPTS+= -mtune=i486
+.endif
+
bsd.gz: bsd.rd
cp bsd.rd bsd.strip
strip bsd.strip
@@ -66,7 +71,7 @@ bsd.rd: ${IMAGE} bsd rdsetroot
bsd:
cd ${.CURDIR}/../../../sys/arch/i386/conf && config ${RAMDISK}
cd ${.CURDIR}/../../../sys/arch/i386/compile/${RAMDISK} && \
- ${MAKE} clean && ${MAKE} depend && COPTS=-Os ${MAKE}
+ ${MAKE} clean && ${MAKE} depend && COPTS="${COPTS}" ${MAKE}
cp ${.CURDIR}/../../../sys/arch/i386/compile/${RAMDISK}/bsd bsd
${IMAGE}: ${CBIN} rd_setup do_files rd_teardown