Incremental LTO linking part 2: lto-plugin support

Sandra Loosemore sandra@codesourcery.com
Mon Jun 18 17:56:00 GMT 2018


On 06/18/2018 11:37 AM, Jan Hubicka wrote:
>>
>> It is exactly the warning newly added by this patch.
>>
>> /scratch/sandra/arm-eabi-upstream/install/lib/gcc/arm-none-eabi/9.0.0/../../../../arm-none-eabi/bin/ld:
>> warning: incremental linking of LTO and non-LTO objects; using
>> -flinker-output=nolto-rel which will bypass whole program optimization
>>
>> I built a completely fresh arm-none-eabi toolchain with a brand-new
>> binutils-gdb trunk checkout, so this isn't a problem with an old binutils.
> 
> This is different issue. Perhaps it is because we normaly link in shared lib but now
> we bring -fno-lto object into LTO incremental link.
> What object files are being linked together here?

The exact commands being used to build one of the test cases are:

arm-none-eabi-g++ -fno-diagnostics-show-caret -fdiagnostics-color=never 
-fmessage-length=0 -fPIC -flto -Wno-return-type -c -o 
cp_lto_20091002-1_0.o 
/scratch/sandra/arm-eabi-upstream/src/gcc-mainline/gcc/testsuite/g++.dg/lto/20091002-1_0.C

arm-none-eabi-g++ cp_lto_20091002-1_0.o g++_tg.o 
-fno-diagnostics-show-caret -fdiagnostics-color=never 
-fmessage-length=0 -fPIC -flto -Wno-return-type -fPIC -r -nostdlib 
   -Wl,-wrap,exit -Wl,-wrap,_exit -Wl,-wrap,main -Wl,-wrap,abort    -o 
g++-dg-lto-20091002-1-01.exe

The target here is the GDB ARM simulator, BTW.

-Sandra



More information about the Gcc-patches mailing list