This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: lto pseudo-object files and fixed registers
On Tue, Feb 7, 2012 at 9:27 AM, Andi Kleen <andi@firstfloor.org> wrote:
> Richard Guenther <richard.guenther@gmail.com> writes:
>>
>> You then can do
>>
>> Âgcc $OPTIONS -flto a.c -o a.o
>> Âgcc $OPTIONS -flto b.c -o b.o
>> Âgcc $OPTIONS -ffixed-r9 -ffixed-r10 -flto d.c -o d.o
>> Âgcc $OPTIONS -ffixed-r9 -ffixed-r10 -flto e.c -o e.o
>> Âgcc $OPTIONS -flto a.o b.o -o non-fixed-reg-part.o -r -nostdlib
>> Âgcc $OPTIONS -flto -ffixed-r9 -ffixed-r10 d.o e.o -o fixed-reg-part.o
>> -r -nostdlib
>> Âgcc non-fixed-reg-part.o fixed-reg-part.o
>>
>> thus, optimize both pieces via partial LTO linking (-r, maybe the -nostdlib is
>> not needed) and then do the final link separately.
>
> Note that ld -r with LTO has some problems in 4.6, it will work fully
> reliable. ÂThis has been fixed in 4.7.
well he is not using ld directly so we go through the LTO path instead.
-- Pinski