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: Richard Guenther
Date: Fri, 27 Nov 2009 11:05:44 +0100
On Fri, Nov 27, 2009 at 7:54 AM, Ralf Wildenhues <Ralf.Wildenhues@xxxxxx> wrote:
> * H.J. Lu wrote on Fri, Nov 27, 2009 at 07:49:32AM CET:
>>
>> You can install libiberty.so without linking it against cc1 while your
>> plugin can link against libiberty.so if needed.
>
> That would still leave you with more than one instance of static data in
> libiberty, which is only ok if you accept to keep libiberty safe for it.
> (IOW, at least it would need some big documentation warning.)

Btw you should be able to link libiberty statically into both cc1
and plugins.  You just need to make sure to not export its symbols
from cc1 (may be as easy/complicated/portable as linking
the whole archive).

Note that I do not think Basiles patch is acceptable - it's a gross
hack that involves an API.

Richard.

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