Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 619674 - sys-devel/gcc add support for debug friendly optimizations levels
Summary: sys-devel/gcc add support for debug friendly optimizations levels
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: cflags
  Show dependency tree
 
Reported: 2017-05-25 12:59 UTC by Alessandro Barbieri
Modified: 2017-12-02 17:45 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alessandro Barbieri 2017-05-25 12:59:17 UTC
I had to build gcc with debug use and -g etc. for having the symbols in the backtraces BUT it still uses -O2 that is not debug friendly, please add support for -Og or -O0


sys-devel/gcc-5.4.0-r3::gentoo was built with the following:
USE="cilk cxx debug fortran gcj go graphite hardened mpx nls nptl objc objc++ objc-gc openmp (pie) (ssp) vtv (-altivec) (-awt) -doc (-fixed-point) (-jit) (-libssp) (-multilib) -nopie -nossp -regression-test (-sanitize) -vanilla" RUBY_TARGETS="rbx"
CFLAGS="-O2 -pipe -march=native -mtune=native -Wformat -Wformat-security -O2 -g2 -ggdb2 -fno-omit-frame-pointer -Wl,-O1 -Wl,--as-needed -Wl,-O2 -Wno-error=implicit-function-declaration"
CXXFLAGS="-O2 -pipe -march=native -mtune=native -Wformat -Wformat-security -O2 -g2 -ggdb2 -fno-omit-frame-pointer -Wl,-O1 -Wl,--as-needed -Wl,-O2 -Wno-error=implicit-function-declaration"
Comment 1 Andreas K. Hüttel archtester gentoo-dev 2017-12-02 17:45:22 UTC
This makes no sense, since the *code* changes with -O0... you end up debugging something different...