gcc-patches@gcc.gnu.org
[Top] [All Lists]

Re: forcing most functions of libiberty in plugin-enabled cc1

Subject: Re: forcing most functions of libiberty in plugin-enabled cc1
From: Rainer Orth
Date: Thu, 26 Nov 2009 20:24:11 +0100
Basile STARYNKEVITCH <basile@xxxxxxxxxxxxxxxxx> writes:

> 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. If that is the case (I really don't know), then we should *force*
> that option, or any other way of making libiberty available, into the GCC
> core! This probably means a Makefile.in patch at least, and probably a
> configure.ac patch also.

Why not just build PIC objects from libiberty, create (say) a
libiberty_pic.a from those (or pic/libiberty.a, whatever), and link the
plugin against that one?  Just as portable, far less ugly, and no
special code in GCC to maintain, listing every function in libiberty.
Btw., the list of functions available in libiberty varies from platform
to platform, so you would have to generate your list a libiberty build
time instead of having a statical list.

     Rainer 

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

<Prev in Thread] Current Thread [Next in Thread>