Re: [PATCH v3] Ability to remap file names in __FILE__, etc (PR other/70268)

2018-01-22 Thread Ximin Luo
Boris Kolpackov: > Ximin Luo writes: > >> -I to an absolute path is not that common for system / distro-built >> stuff. > > Ok, thanks for clarifying. > > >> In the cases that it occurs, indeed it could and should be fixed >> by the package buildsystem, e.g. by stripping a prefix when they >>

Re: [PATCH v3] Ability to remap file names in __FILE__, etc (PR other/70268)

2018-01-21 Thread Boris Kolpackov
Ximin Luo writes: > -I to an absolute path is not that common for system / distro-built > stuff. Ok, thanks for clarifying. > In the cases that it occurs, indeed it could and should be fixed > by the package buildsystem, e.g. by stripping a prefix when they > add -I flags to CFLAGS. But that's

Re: [PATCH v3] Ability to remap file names in __FILE__, etc (PR other/70268)

2018-01-20 Thread Ximin Luo
Boris Kolpackov: > Ximin Luo writes: >> Boris Kolpackov: >> >>> This does feel like we are trying to fix the issue in the wrong place. >>> Also, won't such broken packages normally store all options (including >>> -I) rather than just CFLAGS? And if the answer is no, then perhaps you >>> could put

Re: [PATCH v3] Ability to remap file names in __FILE__, etc (PR other/70268)

2018-01-20 Thread Boris Kolpackov
Ximin Luo writes: > Boris Kolpackov: > > > This does feel like we are trying to fix the issue in the wrong place. > > Also, won't such broken packages normally store all options (including > > -I) rather than just CFLAGS? And if the answer is no, then perhaps you > > could put -ffile-prefix-map i

Re: [PATCH v3] Ability to remap file names in __FILE__, etc (PR other/70268)

2018-01-20 Thread Ximin Luo
Boris Kolpackov: > Ximin Luo writes: > >> Higher-level build scripts sometimes like to save CFLAGS etc into the build >> output, making the overall build output unreproducible even if GCC is >> playing >> nicely. Rather than add logic to strip -f{file,debug,macro,...}-prefix-map, >> into all

Re: [PATCH v3] Ability to remap file names in __FILE__, etc (PR other/70268)

2018-01-18 Thread Boris Kolpackov
Ximin Luo writes: > Higher-level build scripts sometimes like to save CFLAGS etc into the build > output, making the overall build output unreproducible even if GCC is playing > nicely. Rather than add logic to strip -f{file,debug,macro,...}-prefix-map, > into all possible higher-level program

Re: [PATCH v3] Ability to remap file names in __FILE__, etc (PR other/70268)

2018-01-18 Thread Ximin Luo
Hello, I see Boris' patch was accepted with some further changes. Any chance my additions for reproducible builds can be included as well? They are described below. It should still apply on top, minus the strchr -> strrchr change which was folded into Boris' accepted version. Ximin Ximin Luo:

Re: [PATCH v3] Ability to remap file names in __FILE__, etc (PR other/70268)

2017-12-19 Thread Ximin Luo
Boris Kolpackov: > Thanks for the review. Third revision of the patch attached. > > [..] Here is a follow-up patch, meant to be applied on top of Boris' patch, to address some issues we found based on discussions and experiments at the Reproducible Builds project. Most of this patch is re-imple

Re: [PATCH v3] Ability to remap file names in __FILE__, etc (PR other/70268)

2017-12-09 Thread Boris Kolpackov
Thanks for the review. Third revision of the patch attached. Martin Sebor writes: > >>>+/* { dg-options "-ffile-prefix-map==FILE-PREFIX" } */ > >> > >>What's up with this "=="? (as opposed to "="). > > > >Since I cannot predict the actual path, I am remapping empty prefix > >to FILE-PREFIX which