Subject: port-i386/8493: i386_elf lib/csu can't build with -O3
To: None <>
From: Seebs <>
List: netbsd-bugs
Date: 09/25/1999 22:05:40
>Number:         8493
>Category:       port-i386
>Synopsis:       crt0.o gets build without ___start.
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    port-i386-maintainer (NetBSD/i386 Portmaster)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Sep 25 22:05:00 1999
>Originator:     Seebs
>Release:        1999/09/25
System: NetBSD 1.4K NetBSD 1.4K (LOBE) #1: Thu Sep 23 19:41:33 CDT 1999 i386

	If you build with "-O3", gcc "cleverly" optimizes ___start out of
	lib/csu/i386_elf/crt0.c, because it's static and never called from
	anywhere else.
	Get pushy about optimization.
	Two suggestions:
	1.  Override CFLAGS in lib/csu
	2.  Remove the "static".  ___ is reserved namespace anyway, so if
	a user wants a symbol called "___start", tough cookies.