Subject: port-alpha/13634: gcc -O3 can't compile lib/csu on the alpha with recent .init/.fini stuff
To: None <gnats-bugs@gnats.netbsd.org>
From: None <lukem@netbsd.org>
List: netbsd-bugs
Date: 08/06/2001 11:41:05
>Number:         13634
>Category:       port-alpha
>Synopsis:       gcc -O3 can't compile lib/csu on the alpha with recent .init/.fini stuff
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    port-alpha-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Aug 05 18:38:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Luke Mewburn
>Release:        Mon Aug  6 10:11:26 EST 2001
>Organization:
Luke Mewburn  <lukem@wasabisystems.com>  http://www.wasabisystems.com
Luke Mewburn     <lukem@netbsd.org>      http://www.netbsd.org
>Environment:
	
System: NetBSD karybdis 1.5X NetBSD 1.5X (KARYBDIS) #6: Fri Aug  3 14:23:32 EST 2001
lukem@karybdis:/var/scratch/obj.alpha/sys/KARYBDIS alpha
Architecture: alpha
Machine: alpha
>Description:
	programs linked with crt*.o compiled with gcc -O3 after the
	recent .init/.fini changes in lib/csu die with "illegal
	instruction" or "bus error"

>How-To-Repeat:
	add "COPTS+=-O3" to /etc/mk.conf
	# cd /usr/src/lib/csu
	# make clean all install
	# cd /usr/src/bin/ls
	# make clean all
	# ./obj/ls

>Fix:
	don't use "gcc -O3".  i've been told higher optimisations
	aren't supported; if that's the case we should modify the
	gcc front end to limit the level on a given platform to
	what that platform can reliabily generate code for (or does
	that imply -O0 ? :-)
>Release-Note:
>Audit-Trail:
>Unformatted: