This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Built gcc 4.0.0, without C++ support


Rainer Orth:

> Jeroen Scheerder <Jeroen.Scheerder@phil.uu.nl> writes:
> 
> > Partial success only.  I think I'll be able to build it without C++
> > support, but compilation per your instruction does choke on libstdc++.so.6.0.4.
> 
> I've had the same problem and think I know what's going on.
> 
> > ld: fatal: relocation error: file: .libs/stdexcept.o section: .rel.debug_info symbol: : relocation against a discarded symbol,
> >         symbol is part of discarded section: .gnu.linkonce.t._ZNSt12out_of_rangeD0Ev
> 
> If I compare stdexcept.s when building with /usr/sfw/bin/gas vs. gas
> 2.15.96, I see differences like the following:
> 
>  .Ltext0:
>         .weak   _ZTISt11logic_error
> -       .section        .gnu.linkonce.r._ZTISt11logic_error,"a",@progbits
> +       .section        .gnu.linkonce.r._ZTISt11logic_error,"aG",@progbits,_ZTISt11logic_error,comdat
> 
> Comparing gcc/auto-host.h between bootstraps with those different gas
> versions, I find:
> 
>  /* Define 0/1 if your assembler supports COMDAT group. */
> -#define HAVE_GAS_COMDAT_GROUP 0
> +#define HAVE_GAS_COMDAT_GROUP 1
> 
> So obviously Sun ld doesn't have the necessary support for COMDAT groups
> (even with GNU ld, a quite recent version seems to be required).
> Unfortunately, gcc's configure.ac doesn't check for this, but should.

Your analysis is very convincing.  So an ugly workaround would be to
toggle HAVE_GAS_COMDAT_GROUP?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]