Created attachment 44984 [details]
skip -f*-prefix-map options when writing .ali files
The -f(file|debug|macro)-prefix-map=OLD=NEW options added by revision 256847 explicitly ask that OLD is never written.
This patch does not fix the initial problem.
Imagine a compilation driven by gnatmake with
gnatmake main.adb -cargs -fdebug-prefix-map=OLD=NEW
During the compilation phase:
gcc -c -fdebug-prefix-map=OLD=NEW main.adb
* does not write the path to .o (because of the option)
* does not write the path to .ali (because of the patch)
This is good. However, during the link phase, the source generated by the linker (b~main.adb) is compiled by gnatlink. The flags are taken from main.ali, they do not contain -fdebug-prefix-map anymore.
So the path appears in b~main.o then the executable, which is exactly what we want to avoid.
The problem is more general, see
Sorry for the noise.