Bug 1113368 - -flto with gcc 4.9 causes broken debuginfo packages
Summary: -flto with gcc 4.9 causes broken debuginfo packages
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1101935
TreeView+ depends on / blocked
 
Reported: 2014-06-26 04:08 UTC by Mattias Ellert
Modified: 2014-06-26 06:11 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-26 06:11:33 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Mattias Ellert 2014-06-26 04:08:13 UTC
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

Comment 1 Jakub Jelinek 2014-06-26 06:11:33 UTC
If you want usable debug info, you can't use -flto, at least for the past few years and likely next few years too.


Note You need to log in before you can comment on or make changes to this bug.