[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
-O2 optimization
- To: freebsd-arm_(_at_)_freebsd_(_dot_)_org
- Subject: -O2 optimization
- From: "David O'Brien" <obrien_(_at_)_freebsd_(_dot_)_org>
- Date: Mon, 11 Sep 2006 09:32:18 -0700
- Organization: The NUXI BSD Group
- Reply-to: freebsd-arm_(_at_)_freebsd_(_dot_)_org
I've been wondering. Since most ARM platforms are RAM and storage
limited, should we not compile with -O2 and use -Os instead.
-Os is "Optimize for size. -Os enables all -O2 optimizations that do not
typically increase code size. It also performs further optimizations
designed to reduce code size".
So what do folks think about this patch?
Index: kern.pre.mk
===================================================================
RCS file: /home/ncvs/src/sys/conf/kern.pre.mk,v
retrieving revision 1.76
diff -u -p -r1.76 kern.pre.mk
--- kern.pre.mk 17 Jul 2006 18:43:16 -0000 1.76
+++ kern.pre.mk 11 Sep 2006 16:29:47 -0000
@@ -27,7 +27,11 @@ COPTFLAGS?= -O
. if defined(DEBUG)
_MINUS_O= -O
. else
+. if ${MACHINE_ARCH} == "arm"
+_MINUS_O= -Os
+. else
_MINUS_O= -O2
+. endif
. endif
. if ${MACHINE_ARCH} == "amd64"
COPTFLAGS?=-O2 -frename-registers -pipe
--
-- David (obrien_(_at_)_FreeBSD_(_dot_)_org)
Q: Because it reverses the logical flow of conversation.
A: Why is top-posting (putting a reply at the top of the message) frowned upon?
_______________________________________________
freebsd-arm_(_at_)_freebsd_(_dot_)_org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arm
To unsubscribe, send any mail to "freebsd-arm-unsubscribe_(_at_)_freebsd_(_dot_)_org"
Visit your host, monkey.org