Module Name:    src
Committed By:   tsutsui
Date:           Sun Jun 29 05:20:15 UTC 2014

Modified Files:
        src/share/mk: sys.mk

Log Message:
Use "-O2 -fno-reorder-blocks" instead of "-Os" for m68k default optimization.

"-Os" was specfied when gcc 4.5.x was imported and the commit log says
"-O2 produces much bigger code with gcc 4.5 than it did with gcc 4.1"
but "-Os" disables most inline declarations and makes some applications
much slower.  "-O2 -fno-reorder-blocks" seems enough to reduce sizes
and disabling -freorder-blocks wouldn't cause particular performance
impact on ancient m68k machines with small cache memories.
See my post on port-m68k@ for more details:
http://mail-index.NetBSD.org/port-m68k/2014/06/22/msg000488.html

No objection in the thread and "seems fine to me" from mrg@.


To generate a diff of this commit:
cvs rdiff -u -r1.124 -r1.125 src/share/mk/sys.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/mk/sys.mk
diff -u src/share/mk/sys.mk:1.124 src/share/mk/sys.mk:1.125
--- src/share/mk/sys.mk:1.124	Fri Apr 18 00:37:46 2014
+++ src/share/mk/sys.mk	Sun Jun 29 05:20:15 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: sys.mk,v 1.124 2014/04/18 00:37:46 christos Exp $
+#	$NetBSD: sys.mk,v 1.125 2014/06/29 05:20:15 tsutsui Exp $
 #	@(#)sys.mk	8.2 (Berkeley) 3/21/94
 #
 # This file contains the basic rules for make(1) and is read first
@@ -28,8 +28,8 @@ CC?=		cc
 # -O2 is too -falign-* zealous for low-memory sh3 machines
 DBG?=	-Os -freorder-blocks
 .elif ${MACHINE_ARCH} == "m68k" || ${MACHINE_ARCH} == "m68000"
-# see src/doc/HACKS for details
-DBG?=	-Os
+# -freorder-blocks (enabled by -O2) produces much bigger code
+DBG?=	-O2 -fno-reorder-blocks
 .elif ${MACHINE_ARCH} == "coldfire"
 DBG?=	-O1
 .elif ${MACHINE_ARCH} == "vax"

Reply via email to