From: Basile STARYNKEVITCH <basile@starynkevitch.net>
To: Dave Korn <dave.korn.cygwin@googlemail.com>
Cc: gcc@gcc.gnu.org
Subject: Re: libiberty should be a shared library when cc1 has plugin enabled.
Date: Thu, 09 Jul 2009 12:38:00 -0000 [thread overview]
Message-ID: <4A55E494.8060803@starynkevitch.net> (raw)
In-Reply-To: <4A55E2CF.3000600@gmail.com>
Dave Korn wrote:
> Basile STARYNKEVITCH wrote:
>
>> Dave Korn wrote:
>>
>>>> We might also artificially add a reference to each libiberty function
>>>> from
>>>> cc1.
>>>>
>>> Or link it into cc1 et al. using "--whole-archive".
>>>
>>>
>>>
>> Sorry, I am not aware of this option. And are we sure it works on all
>> the systems GCC is supposed to run on?
>>
>
> Ach. It requires GNU ld, of course. We could just link the objects from
> the libiberty/ dir into cc1 (etc.) instead of the lib .a archive.
Anyway, I am not able to do that well. The point is that libiberty is
designed to provide a common interface to all the many systems GCC is
supposed to run on, and even if restricting ourselves to those having
ELF & a working dlopen, that makes a lot. In other words, I am
unfamiliar with libiberty (and I am not sure to understand why in 2009,
with the existing Posix & OpenGroup standards, it is still required. I
suppose it is a legacy).
Also, I don't know if we should patch libiberty or gcc/ directory to
solve that (I am not sure if libiberty is legally a part of GCC; ie does
the legal right to patch GCC is enough for libliberty, which is perhaps
shared with other stuff like binutils).
The quick & dirty fix would be to add inside eg gcc-plugin.c a table of
function pointers, or perhaps some code, referencing most (or preferably
all) of libiberty functions.
While pluginifying MELT I have to add a lot of dirty patches to avoid
(i.e. circumvent them) libiberty functions. This is a pity!
Regards.
--
Basile STARYNKEVITCH http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mines, sont seulement les miennes} ***
next prev parent reply other threads:[~2009-07-09 12:38 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-09 8:49 Basile Starynkevitch
2009-07-09 11:41 ` Dave Korn
2009-07-09 11:58 ` Basile STARYNKEVITCH
2009-07-09 12:17 ` Dave Korn
2009-07-09 12:38 ` Basile STARYNKEVITCH [this message]
2009-07-09 12:50 ` Daniel Jacobowitz
2009-07-09 13:01 ` Basile STARYNKEVITCH
2009-07-09 13:43 ` Daniel Jacobowitz
2009-07-09 13:46 ` Basile STARYNKEVITCH
2009-07-09 13:59 ` Daniel Jacobowitz
2009-07-09 14:06 ` Basile STARYNKEVITCH
2009-07-09 15:07 ` Ralf Wildenhues
2009-07-09 15:20 ` Basile STARYNKEVITCH
2009-07-09 13:07 ` Ralf Wildenhues
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A55E494.8060803@starynkevitch.net \
--to=basile@starynkevitch.net \
--cc=dave.korn.cygwin@googlemail.com \
--cc=gcc@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).