On 08/02/2017 10:47 PM, Yury Gribov wrote:
> On 03.08.2017 3:06, Ximin Luo wrote:
>> Jeff Law:
>>> On 07/21/2017 10:15 AM, Ximin Luo wrote:
>>>> (Please keep me on CC, I am not subscribed)
>>>>
>>>>
>>>> Proposal
>>>> ========
>>>>
>>>> This patch series adds a new environment variable
>>>> BUILD_PATH_PREFIX_MAP. When
>>>> this is set, GCC will treat this as extra implicit
>>>> "-fdebug-prefix-map=$value"
>>>> command-line arguments that precede any explicit ones. This makes
>>>> the final
>>>> binary output reproducible, and also hides the unreproducible value
>>>> (the source
>>>> path prefixes) from CFLAGS et. al. which many build tools
>>>> (understandably)
>>>> embed as-is into their build output.
>>> I'd *really* avoid doing this with magic environment variables.  Make it
>>> a first class option to the compiler.  Yes, it means projects that want
>>> this behavior have to arrange to pass that flag to their compiler, but
>>> IMHO that's much preferred over environment variables.
>>>
>>> Jeff
>>>
>>
>> Hi Jeff,
>>
>> If by "first class option" you meant a command-line flag, GCC *already
>> has* that (-fdebug-prefix-map) > and it wasn't enough to achieve
>> reproducibility in many cases we tested.
> 
> Shouldn't -fdebug-prefix-map be updated to use the same syntax as
> BUILD_PATH_PREFIX_MAP?
Or a different option to cover what Ximin is trying to do with
BUILD_PATH_PREFIX_MAP.  BUILD_PATH_PREFIX_MAP has to go, I'm not going
to approve it in that form.  But I would seriously consider the same
functionality as a command line switch.

jeff

Reply via email to