> But with the above details, how can I figure out how to run gdb, ie what > arguments to give to gdb --args?
This is an area that needs some improvement :-( What I do is pass -Wl,-debug to gcc. That will make collect2 print the call to ld. Add a -plugin-opt=-debug to it and it should print the call to lto-wrapper. > I suppose the offending process is probably > /usr/local/libexec/gcc-trunk/gcc/x86_64-unknown-linux-gnu/4.5.0/lto1 -quiet > -dumpbase interp.pic.o -mtune=generic -auxbase-strip /tmp/ccKdeyrC.lto.o -O2 > -version @/tmp/ccJMSLwC -o /tmp/ccODq2S4.s > > But I am not sure to understand correctly, in particular the @/tmp/ccJMSLwC > argument puzzles me. Apparently, some program arguments are collected in > some temporary files.... That is correct. This is to avoid command lines that are too large. We currently delete those files during the plugin cleanup. I will send a patch disabling cleanup if -debug is given. > So how do I run lto1 under GDB, knowing the faulty gcc invocation? Given the lto-wrapper line above, add -debug to it and it will print the lto1 invocation. > Regards. > Cheers, -- Rafael Ávila de Espíndola