https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108534
Bug ID: 108534
Summary: LTO streamer does not remap source directory
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: lto
Assignee: unassigned at gcc dot gnu.org
Reporter: ian at airs dot com
CC: marxin at gcc dot gnu.org
Target Milestone: ---
The LTO streamer can pass the source directory through without calling
remap_debug_filename. This path can escape into the debug information, which
can make it hard to create reproducible results when using LTO.
Specifically lto_output_location_1 writes the output of get_src_pwd into the
stream without calling remap_debug_filename.
This causes some complexity for Go tooling as discussed at the comment thread
starting at
https://go-review.googlesource.com/c/go/+/413974/15#message-4a4b317f08c2aee261b93c37c82a2bcab21830d8
. Basically, the Go tool is trying to get a reproducible build using LTO, and
failing due to the inclusion of an unmapped directory.