This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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: [PATCH] Add plugin interface to LD [2/4] Claim files and add symbols.


Hi Dave,

* Dave Korn wrote on Thu, Sep 30, 2010 at 03:43:03PM CEST:
> On 23/09/2010 07:13, Ralf Wildenhues wrote:
> > Ordering.  You can't rely on libtool expanding -Wl, link flags after the
> > objects, meaning that libiberty may not be picked up at all.  (With
> > static linking, objects and libraries are evaluated in a strict command
> > line order, so all needed libraries must come after objects that need
> > them.)
> 
>   Seems I'm not the only one who has this problem.  The makefile for GCC's
> lto-plugin links libiberty like so:
> 
> > liblto_plugin_la_LIBADD = $(LIBELFLIBS) ../libiberty/pic/libiberty.a
> 
> which produces this warning on Linux:
[...]
>   When I try using LIBADD to link a static archive into a shared library on
> Cygwin, such as like so:
> 
> > libldtestplug_la_LIBADD = $(LIBIBERTY)
> 
> ... that warning becomes an error:

Ouch.

>   So if -Wl won't work, what can I do?  Do I have to build a libtool
> convenience library out of the libiberty object files?

Then use -Wc, please, so at least it is passed through to the compiler
driver without -Wl,.  A convenience archive would be cleaner from a
libtool POV, yes; I think I suggested that at one time but wasn't
received too well.

Cheers,
Ralf


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