Re: [gtk-list] Re: HP-UX modules follow up

Dave Glowacki wrote:

> > > --> Linking Plugin A: lib/
> > >         cc -Wl,-b -Wl,+h, -o lib/
> > > obj/libpluga.o -ldld
> > > /usr/ccs/bin/ld: DP relative code in file /opt/langtools/lib/crt0.o -
> > > shared library must be position
> > >     independent.  Use +z or +Z to recompile.
> >
> >   Strange thing, using cc and passing -Wl arguments causes it to
> > break, whereas using ld directly makes it link without problems.
> > But on Linux I get the opposite effect, using ld directly causes
> > problems and using cc to link makes it good,
> Running 'cc' with '-v' gives something like:

Thanks for that tip, this verbose info is indeed very useful. 
Somehow I missed that one :)

>         /usr/ccs/bin/ld /opt/langtools/lib/crt0.o -u main -b +h \
>                 -o lib/ obj/libpluga.o -ldld -lc
> Since you're trying to build a shared library, you don't want crt0.o
> linked in.  I didn't see any way to tell 'cc' not to link in crt0.o
> and libtool seems to use 'ld' directly.
> > any ideas?
> Use libtool?

I am experimenting with the thing but I guess libtool is out of
the question :(.

And then... this thing is rather tricky, it seems making the prefers using 'ld' directly, but making the executable
doesn't. Will have to spend more time getting this bloody
thing 'normalized' to stay away from 'command line hacks' :)


D. Emilio Grimaldo Tunon       Compuware Europe B.V. (Uniface Lab)
Software Engineer	       Amsterdam, The Netherlands  Tel. +31 (0)20 3126 516
*** The opinions expressed hereby are mine and not my employer's ***

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