Subject: bin/32117: ld.elf_so/Makefile shouldn't set -O3 for all ports
To: None <gnats-admin@netbsd.org, netbsd-bugs@netbsd.org>
From: None <tsutsui@ceres.dti.ne.jp>
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
>Organization:
>Environment:
NetBSD/i386, but possibly affects all ports.
>Description:
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.
>How-To-Repeat:
Code inspection.
>Fix:
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
here.
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 @@
#CPPFLAGS+= -DRTLD_DEBUG
#CPPFLAGS+= -DRTLD_DEBUG_RELOC
#DBG= -g
+.if (${MACHINE_ARCH} == "i386")
DBG= -O3 -fomit-frame-pointer
+.endif
.if ${SHLIBDIR} != ${LIBDIR}
CPPFLAGS+= -DRTLD_DEFAULT_LIBRARY_PATH=\"${SHLIBDIR}:${LIBDIR}\"