Bit-reproduciblity issue for gfortran .mod files
Janne Blomqvist
blomqvist.janne@gmail.com
Mon Feb 5 09:53:00 GMT 2018
On Mon, Feb 5, 2018 at 11:03 AM, Alastair McKinstry
<alastair.mckinstry@sceal.ie> wrote:
> On 03/02/2018 01:58, Steve Kargl wrote:
>
>>
>>> +/* for GNU / POSIX basename */
>>> +#define _GNU_SOURCE
>>> +#include <string.h>
>>> +
>> What is the above for? basename(3) is declared in libgen.h.
>>
> I hadn't tested the libgen.h version, only this one. The manual page
> points out that there are two versions, and "The GNU version never
> modifies its argument", which made me wary of using the libgen.h one.
All the world is not Debian; there are even poor misguided souls out
there stuck on non-POSIX systems.
So while reproducible builds are important and this is a good catch,
your patch as-is is not really usable. But luckily gcc includes a copy
of libiberty, including lbasename(). That function seems to be used by
other frontends, so I'd suggest using that instead.
--
Janne Blomqvist
More information about the Fortran
mailing list