Description of problem: Debuginfo packages are not containing sources when -flto is used with gcc 4.9 Version-Release number of selected component (if applicable): gcc-4.9.0-12.fc21.x86_64 How reproducible: Always Steps to Reproduce: 1. Compile the R-qtl package for Fedora 21 Actual results: Debuginfo package without sources Expected results: Debuginfo package with sources Additional info: Compiling the package for Fedora 20 with gcc 4.8 works as expected - debuginfo package contains sources. If I manually hack the /usr/lib64/R/etc/Makeconf file to change the compiler flags used by R module compilation from "LTO = -flto" to "LTO = -fno-lto" the debuginfo package contains sources as expected. On Fedora 20 (gcc-4.8.2-7.fc20.x86_64) the compiled module contains references to the source files: $ readelf -a qtl.so | grep FILE 33: 0000000000000000 0 FILE LOCAL DEFAULT ABS crtstuff.c 42: 0000000000000000 0 FILE LOCAL DEFAULT ABS countXO.c 43: 0000000000000000 0 FILE LOCAL DEFAULT ABS discan.c 44: 0000000000000000 0 FILE LOCAL DEFAULT ABS discan_covar.c 45: 0000000000000000 0 FILE LOCAL DEFAULT ABS effectscan.c 46: 0000000000000000 0 FILE LOCAL DEFAULT ABS fill_geno_nodblXO.c On Fedora 21 (gcc-4.9.0-12.fc21.x86_64) it does not: $ readelf -a qtl.so | grep 'FILE' 26: 0000000000000000 0 FILE LOCAL DEFAULT ABS crtstuff.c 35: 0000000000000000 0 FILE LOCAL DEFAULT ABS ccuxkewq.ltrans0.o 36: 0000000000000000 0 FILE LOCAL DEFAULT ABS ccuxkewq.ltrans1.o 38: 0000000000000000 0 FILE LOCAL DEFAULT ABS ccuxkewq.ltrans2.o 39: 0000000000000000 0 FILE LOCAL DEFAULT ABS ccuxkewq.ltrans3.o 40: 0000000000000000 0 FILE LOCAL DEFAULT ABS ccuxkewq.ltrans4.o
If you want usable debug info, you can't use -flto, at least for the past few years and likely next few years too.