On Sat, May 30, 2020 at 05:10:49PM +0200, Jeremie Courreges-Anglas wrote: > On Sat, May 30 2020, Marc Espie <es...@nerim.net> wrote: > >> - have some magic I don't know in ELF handling that would allow to either > >> tweak the default location/introduce ${WRKOBJDIR} in that debug info. > > > > Thinking some more about it, that 3rd option is possibly not that > > far-fetched > > > > we do pass most debug-info thru dwz for shrinkage, so there's one tool > > that does peek inside dwarf debug and does compaction, I have zero idea how > > hard it is to tweak paths as well. > > Take a look at -fdebug-prefix-map. > > https://reproducible-builds.org/docs/build-path/
Nice, thanks :) So just adding this to CFLAGS/CXXFLAGS whenever DEBUG_PACKAGES is set should be enough