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: [PATCH 2/2] Add gcc-ar, gcc-ranlib, gcc-ld wrappers


On 10/29/2010 01:46 PM, Andi Kleen wrote:
From: Andi Kleen<ak@linux.intel.com>

Earlier review resulted in a request for having gcc-... wrappers
to handle the LTO symbol tables for ranlib/ar. This is needed for slim
lto files, because these tools cannot read the symbol table
otherwise. Essentially they just call binutils with
the LTO plugin specified.

Other compilers with LTO support tend to have similar tools.

This patch implements those wrappers. I also added a wrapper for ld
because I needed one for a large existing Makefile with a lot
of complicated ld calls. It turns an ld command line into
a gcc command line suitable for lto.

The wrappers are also needed for a LTO slim of gcc. Right now
they have to be manually specified for that.

The wrappers require uptodate binutils (the upcoming release)
with plugin support enabled.  There is currently no autoconf
support to detect that. The wrappers query the gcc driver
in an attempt to handle cross compilation and so naming everywhere.

Besides the problems that Joseph pointed out (I agree BTW that a rewrite in C is required for this to go in) I'm not sure I like the idea.


Is there any reason why the LTO plugin's additional capabilities should not be used _by default_ by ar/ranlib/ld (as a GNU extension to ELF, basically)? I don't follow binutils development at all, what are other useful applications of plugins?

Paolo


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