Subject: bin/32117: ld.elf_so/Makefile shouldn't set -O3 for all ports
To: None <,>
From: None <>
List: netbsd-bugs
Date: 11/19/2005 14:18:00
>Number:         32117
>Category:       bin
>Synopsis:       ld.elf_so/Makefile shouldn't set -O3 for all ports
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sat Nov 19 14:18:00 +0000 2005
>Originator:     Izumi Tsutsui
>Release:        NetBSD 3.99.11
NetBSD/i386, but possibly affects all ports.
src/libexec/ld.elf_so/Makefile explicitly sets DBG=-O3 -fomit-frame-pointer ,
but on some ports gcc -O3 may be problematic so it shouldn't be
specified by defaut.

Code inspection.

Override DBG only on ports whose gcc -O3 is confirmed working properly.
At least, ports which have DBG=-O (not -O2) by default shouldn't use -O3

Index: Makefile
RCS file: /cvsroot/src/libexec/ld.elf_so/Makefile,v
retrieving revision 1.72
diff -u -r1.72 Makefile
--- Makefile	4 Jun 2005 16:17:17 -0000	1.72
+++ Makefile	19 Nov 2005 14:09:00 -0000
@@ -47,7 +47,9 @@
 #DBG=		-g
+.if	(${MACHINE_ARCH} == "i386")
 DBG=		-O3 -fomit-frame-pointer
 .if ${SHLIBDIR} != ${LIBDIR}