Re: [PATCH] Add gcc-ar/nm/ranlib wrappers for slim LTO v2

2011-10-28 Thread Richard Guenther
On Fri, Oct 21, 2011 at 1:55 AM, Andi Kleen wrote: > From: Andi Kleen > > Slim LTO requires running ar/nm/ranlib with the LTO plugin. The most > convenient way to get this into existing Makefiles is using small > wrappers that pass the plugin. This matches how other compilers > (LLVM, icc) do thi

Re: [PATCH] Add gcc-ar/nm/ranlib wrappers for slim LTO

2011-10-20 Thread Joseph S. Myers
On Thu, 20 Oct 2011, Andi Kleen wrote: > collect2 does not fully match what gcc.c does I think, so there's > already some divergence. collect2 is always called from within the gcc driver, so it can rely on environment variables set by the driver. As I understand it, these wrappers are not call

Re: [PATCH] Add gcc-ar/nm/ranlib wrappers for slim LTO

2011-10-20 Thread Joseph S. Myers
On Thu, 20 Oct 2011, Andi Kleen wrote: > The logic gcc.c uses to find the files is very complicated. I didn't > try to replicate it 100% and left out some magic. I would be interested > if this simple method works for everyone or if more code needs > to be added. This only needs to support LTO sup

Re: [PATCH] Add gcc-ar/nm/ranlib wrappers for slim LTO

2011-10-20 Thread Andi Kleen
On Thu, Oct 20, 2011 at 10:45:31AM +0200, Richard Guenther wrote: > > My previous attempt at using shell scripts for this > > http://gcc.gnu.org/ml/gcc-patches/2010-10/msg02471.html > > was not approved. Here's another attempt using wrappers written > > in C. It's only a single wrapper which just a

Re: [PATCH] Add gcc-ar/nm/ranlib wrappers for slim LTO

2011-10-20 Thread Richard Guenther
On Thu, Oct 20, 2011 at 10:56 AM, Jan Hubicka wrote: >> On Thu, Oct 20, 2011 at 9:24 AM, Andi Kleen wrote: >> > From: Andi Kleen >> > >> > Slim LTO requires running ar/nm/ranlib with the LTO plugin. The most >> > convenient way to get this into existing Makefiles is using small >> > wrappers tha

Re: [PATCH] Add gcc-ar/nm/ranlib wrappers for slim LTO

2011-10-20 Thread Jan Hubicka
> On Thu, Oct 20, 2011 at 9:24 AM, Andi Kleen wrote: > > From: Andi Kleen > > > > Slim LTO requires running ar/nm/ranlib with the LTO plugin. The most > > convenient way to get this into existing Makefiles is using small > > wrappers that pass the plugin. This matches how other compilers > > (LLV

Re: [PATCH] Add gcc-ar/nm/ranlib wrappers for slim LTO

2011-10-20 Thread Richard Guenther
On Thu, Oct 20, 2011 at 9:24 AM, Andi Kleen wrote: > From: Andi Kleen > > Slim LTO requires running ar/nm/ranlib with the LTO plugin. The most > convenient way to get this into existing Makefiles is using small > wrappers that pass the plugin. This matches how other compilers > (LLVM, icc) do thi