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.