Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 570606 - automatic integration w/-freport-bug (gcc-5+ flag)
Summary: automatic integration w/-freport-bug (gcc-5+ flag)
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Ebuild Support (show other bugs)
Hardware: All Linux
: Normal enhancement
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-02 15:20 UTC by SpanKY
Modified: 2022-03-16 01:54 UTC (History)
3 users (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 SpanKY gentoo-dev 2016-01-02 15:20:19 UTC
newer gcc versions provide a -freport-bug flag.  it would be nice if portage could detect whether the active $CC supported this, and if so, automatically append it (if it doesn't already exist) to CFLAGS & CPPFLAGS.

when such a crash did occur and gcc did dump info, portage could mention it in the bug summary.  this would take a bit more work as the output looks something like:
...
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bugs.gentoo.org/> for instructions.
Preprocessed source stored into /tmp/ccsiCi48.out file, please attach this to your bugreport.

portage would want to scrape the log, look for that last line, and then copy the output file to $T.  i'm not sure it's possible to control the location normally :/.
Comment 1 Alex Xu (Hello71) 2016-01-02 16:48:58 UTC
-freport-bug sends files to the tmpdir as determined by libiberty's choose_tmpdir, which on Linux chooses the first available of:

TMPDIR
TMP
TEMP
/var/tmp
/usr/tmp
/tmp
cwd

so one solution would be to export TMPDIR=${T}. another solution might be to scrape the build log and re-run the failing gcc command with TMPDIR=${T}, but that might be even worse than the previous solution (cmake comes to mind).
Comment 2 Alex Xu (Hello71) 2016-01-02 17:39:50 UTC
it has come to my attention that we already export TMPDIR=${T}. therefore, it should be sufficient to automatically detect an ICE and ask the user to attach ${T}/cc*.