__CTOR_LIST__ brokeness for NetBSD a.out (egcs-2.93.21 19990513)
Krister Walfridsson
cato@df.lth.se
Mon May 17 14:28:00 GMT 1999
On Sat, 15 May 1999, Jeffrey A Law wrote:
> In message < Pine.LNX.4.05-df.9905132134340.2555-100000@bartlet.df.lth.se >you
> write:
> > I'm getting lots of testsuite failures on my NetBSD machines (i386, arm32
> > and sparc) from the change
> >
> > 1999-03-24 Jim Blandy <jimb@zwingli.cygnus.com>
> >
> > * libgcc2.c (__CTOR_LIST__, __DTOR_LIST__): Initialize on all
> > platforms.
> What happens if you turn off flag_gnu_linker and use collect2 to handle
> ctors/dtors?
>
> You have to run collect2 anyway for some EH stuff, having collect handle
> ctors/dtors is better than using disgusting stabs extensions anyway.
This solves my problems. Below are a patch that add 'use_collect2' to all
NetBSD a.out archs.
/Krister
Mon May 17 21:21:21 1999 Krister Walfridsson <cato@df.lth.se>
* configure.in (arm*-*-netbsd*): Use collect2.
(i[34567]86-*-netbsd*): Likewise.
(m68k*-*-netbsd*): Likewise.
(ns32k-*-netbsd*): Likewise.
(sparc-*-netbsd*): Likewise.
(vax-*-netbsd*): Likewise.
RCS file: /egcs/carton/cvsfiles/egcs/gcc/configure.in,v
retrieving revision 1.245
diff -c -3 -r1.245 configure.in
*** configure.in 1999/05/12 17:38:26 1.245
--- configure.in 1999/05/17 21:21:21
***************
*** 743,748 ****
--- 743,749 ----
tm_file=arm/netbsd.h
xm_file="arm/xm-netbsd.h ${xm_file}"
tmake_file="t-netbsd arm/t-netbsd"
+ use_collect2=yes
;;
arm*-*-linux-gnuaout*) # ARM GNU/Linux with a.out
cpu_type=arm
***************
*** 1155,1160 ****
--- 1156,1162 ----
changequote([,])dnl
tm_file=i386/netbsd.h
tmake_file=t-netbsd
+ use_collect2=yes
;;
changequote(,)dnl
i[34567]86-*-openbsd*)
***************
*** 2030,2035 ****
--- 2032,2038 ----
tm_file=m68k/netbsd.h
tmake_file=t-netbsd
float_format=m68k
+ use_collect2=yes
;;
m68k*-*-openbsd*)
float_format=m68k
***************
*** 2709,2714 ****
--- 2712,2718 ----
xm_file="ns32k/xm-netbsd.h ${xm_file}"
# On NetBSD, the headers are already okay, except for math.h.
tmake_file=t-netbsd
+ use_collect2=yes
;;
pdp11-*-bsd)
tm_file="${tm_file} pdp11/2bsd.h"
***************
*** 3016,3021 ****
--- 3020,3026 ----
sparc-*-netbsd*)
tm_file=sparc/netbsd.h
tmake_file=t-netbsd
+ use_collect2=yes
;;
sparc-*-openbsd*)
# we need collect2 until our bug is fixed...
***************
*** 3248,3253 ****
--- 3253,3259 ----
tm_file="${tm_file} netbsd.h vax/netbsd.h"
tmake_file=t-netbsd
float_format=vax
+ use_collect2=yes
;;
vax-*-openbsd*)
tmake_file="${tmake_file} vax/t-openbsd"
More information about the Gcc-bugs
mailing list