This is the mail archive of the gcc-patches@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: forcing most functions of libiberty in plugin-enabled cc1


* Basile STARYNKEVITCH wrote on Thu, Nov 26, 2009 at 08:18:18PM CET:
> The answer use --whole-archive is not adequate, unless the
> --whole-archive option is available on every system on which GCC
> wants to permit plugins.

Some linkers have a different way to spell it (e.g., -zallextract).
With linkers that don't have it, one could enumerate all objects
libiberty.a is comprised of.  libtool does this when it creates a shared
library that links against a convenience archive.

(Note I'm not proposing to use libtool for linking cc1, but the
algorithm could be copied from there.)

Other possibilities would be to either make libiberty a proper shared
library, including a stable API (which was already rejected), or stick
to making libiberty clean for multiple instances of it inside a single
executable.  (This is a restriction for code inside libiberty.)

Cheers,
Ralf


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