Re: Linking glib with gld in Irix



On Thu, 11 Aug 2005 14:51:36 -0500
Albert Chin <gtk-devel-list mlists thewrittenword com> wrote:

> On Wed, Aug 10, 2005 at 02:22:17PM +0200, Magnus Bergman wrote:
> > On Tue, 9 Aug 2005 14:48:25 -0500
> > Albert Chin <gtk-devel-list mlists thewrittenword com> wrote:
> > 
> > > On Mon, Aug 08, 2005 at 03:41:19PM +0200, Magnus Bergman wrote:
> > > > I have problems building glib (2.6.6) in Irix using GCC, gas
> > > > and gld (no, I don't forget to use --with-gnu-ld). It fails
> > > > then linking glib-genmarshal against glib because some symbols,
> > > > including g_malloc cannot be found. Then I examine the glib
> > > > library (using GNU objdump) I see than most symbols are marked
> > > > hidden, for example:
> > > > 
> > > > 60017e80 l     F *ABS*  00000000 .hidden IA__g_malloc
> > > > 
> > > > While a few are not, for example:
> > > > 
> > > > 600354bc g     F *ABS*  00000000 g_strcasecmp
> > > 
> > > Is GNU ld even recommended for building GCC no IRIX? I don't
> > > think so. GNU ld isn't feature-complete on IRIX:
> > >   http://sourceware.org/ml/binutils/2005-06/msg00621.html
> > 
> > Yes, I'm well aware of that issue and had to hack around it. It
> > happens every time you link to the thread library without linking
> > to the mpi library (and if you DO link with the mpi library the
> > same thing happens with another library and so on). But there are
> > bigger issues then not using gld I think. And I think that gld has
> > become the default linker for GCC on Irix recently.
> 
> I think they're only recommending GNU as.

You are probably right.

> There are certainly issues with GCC 3.4+ with IRIX ld though. We've
> run into one so far:
>   http://lists.gnu.org/archive/html/emacs-devel/2005-06/msg00488.html

That looked quite bad. But several Irix/mips issues has been fixed in
GCC 4 I was told. The SGI compiler isn't without issues either. If
I try to use it to compile GTK, the compiler segfaults. And if one
compiles for the old 32bit ABI (which I sometimes need to do) it uses
an old, outdated and unmaintained version of the compiler. There
are certainly less issues with GCC according to my experience.

> > Do you know if these issues (of gld) are related?
> 
> No idea. Why not try linking with /bin/ld to determine if the problem
> is GCC or GNU ld?

Yes, I will configure the next GCC version I install to use the native
ld. (If that works with a multilib configuration which I need.)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]