This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: ld segfaults in gcc-3.1's configuration
Am Die, 2002-04-30 um 10.08 schrieb Jakub Jelinek:
> On Tue, Apr 30, 2002 at 09:21:16AM +0200, Ralf Corsepius wrote:
> > Hi,
> >
> > I am observing a segfault in ld/binutils-2.12 during gcc31's
> > configuration (gcc-3-1-branch from a couple of minutes ago):
> >
> > ../gcc-3.1-branch/configure --target=sparc-rtems --with-gnu-as
> > --with-gnu-ld --with-newlib '--enable-languages=c,c++'
> > --prefix=/opt/rtems
> > [..]
> > checking assembler --gstabs support... yes
> > checking linker PT_GNU_EH_FRAME support... yes
> > checking whether linker eh_frame optimizations work properly...
> > ../../gcc-3.1-branch/gcc/configure: line 7880: 13803 Segmentation
> > fault $gcc_cv_ld --eh-frame-hdr -shared -o conftest.so conftest.o
> > 1>&5 2>&1
> > no
> > Using ggc-page for garbage collection.
> > checking whether to enable maintainer-specific portions of Makefiles...
> > no
> > [..]
>
> Yes, on some architectures ld even segfaults, that's one of the bugs
> configury is checking for. If you have fixed binutils (hj's 2.12.90.0.7 or
> CVS), it will not segfault and print yes.
If I understand correctly, you are saying, the segfault is the nominal
behaviour and doesn't impact gcc's runtime functionality nor its
configuration?
Though seeing configure-checks segfaulting seems odd to me (segfaults in
configure checks normally indicate that either a check has failed badly
or a tools being tested is too bad for the check to perform correctly),
I don't have a problem with this (One only needs to know).
> If you'd prefer to have polished output on stdout, something like:
I'll leave the decision to others.
> --- gcc/configure.in.jj Mon Apr 29 12:40:28 2002
> +++ gcc/configure.in Tue Apr 30 10:13:40 2002
> @@ -2131,8 +2131,8 @@ if test x"$gcc_cv_ld_eh_frame_hdr" = xye
> .LEFDE3:
> .4byte 0
> EOF
> - if $gcc_cv_as -o conftest.o conftest.s 1>&AC_FD_CC 2>&1; then
> - if $gcc_cv_ld --eh-frame-hdr -shared -o conftest.so conftest.o 1>&AC_FD_CC 2>&1; then
> + if ($gcc_cv_as -o conftest.o conftest.s; exit) 1>&AC_FD_CC 2>&1; then
> + if ($gcc_cv_ld --eh-frame-hdr -shared -o conftest.so conftest.o; exit) 1>&AC_FD_CC 2>&1; then
> changequote(,)dnl
> if $gcc_cv_objdump -h conftest.so 2>&AC_FD_CC \
> | grep 'eh_frame_hdr[ ]*0*[01][048cC][ ]' 1>&AC_FD_CC 2>&1; then
>
> should do the job (though don't know how portable exit without arguments is,
> maybe exit $? would be more portable).
According to autoconf.info, exit $? is more portable.
Ralf