Daniel Kahn Gillmor:
> On Wed 2016-08-24 07:20:00 -0400, Ximin Luo wrote:
>> 2. Define another variable SOURCE_ROOT to be set to the top-level
>> source dir, and patch GCC to use this as the default value for
>> debug-prefix-map (and the analogue for other languages / tools).
>> This would have the same concrete behaviour as the current situation,
>> but then we're defining yet another variable... but probably less
>> tools will need to support this than SOURCE_DATE_EPOCH. And as with
>> (1), this would not be necessary for the path-is-namespace languages.
> Please see:
> in particular, this patch here:
> See also the mild pushback from upstream about the env var
> Bernd Schmidt <bschm...@redhat.com> wrote:
>>>> Wouldn't it be simpler just to special-case -fdebug-prefix-map in
>>>> gen_producer_string? The environment variable thing strikes me as
> I didn't have Ximin's analysis to back up the argument for the env var
> case, and it seemed (and was) easier to just drop -fdebug-prefix-map
> From gen_producer_string.
> If you want to try to push this forward, i can follow up on that thread
> and ask for reconsideration of the associated patch.
Thanks, I did see this a while ago and forgot about it. However it does differ
from the current proposal in an important way.
Current proposal (2): GCC should, if SOURCE_ROOT is set and debug-prefix-map is
not given, *automatically* use this variable. There is no opportunity for the
user to tell GCC to look at a different variable.
OTOH your patch above has GCC read a user-supplied variable. I think we want to
avoid this, for the same reason that we pushed quite heavily for upstreams to
support SOURCE_DATE_EPOCH and not their own custom command line option. It
would also fix packages using gcc but not dpkg-buildflags (and for other
But for sure we can start from the code that you already wrote. :)
Reproducible-builds mailing list