This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: GCC produces slightly different .o files on two consecutive runs in certain conditions
- From: Shlomi Fish <shlomif at gmail dot com>
- To: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- Cc: gcc-help <gcc-help at gcc dot gnu dot org>
- Date: Tue, 29 Jan 2019 02:23:03 +0200
- Subject: Re: GCC produces slightly different .o files on two consecutive runs in certain conditions
- References: <CANy4znUBRzVUnyu93DqLEde+Sxvo8Pft11REZeoTWu3=9Gwuog@mail.gmail.com> <CAH6eHdQD+-Gv_Vm47eNdHOxit9N76mekRV2NKyy8dQZ7RYuwBw@mail.gmail.com> <CANy4znUde6_3+gJ33TVbWZmtFdYn1XMay=cSm5gp-62FmJJg+Q@mail.gmail.com>
Hi!
On Tue, Jan 29, 2019 at 1:50 AM Shlomi Fish <shlomif@gmail.com> wrote:
> Hi,
>
> On Tue, Jan 29, 2019 at 1:28 AM Jonathan Wakely <jwakely.gcc@gmail.com>
> wrote:
>
>> On Mon, 28 Jan 2019 at 23:24, Shlomi Fish <shlomif@gmail.com> wrote:
>> >
>> > Hi all!
>> >
>> > I am trying to do a https://reproducible-builds.org/ setup in my C /
>> gnu11
>> > / cmake based FOSS project so I can cache valgrind results. The project
>> is
>> > https://fc-solve.shlomifish.org/ and it has a git repo at
>> > https://github.com/shlomif/fc-solve .
>>
>> It's not clear from your mail if you're using some or all of GCC's
>> options that are relevant, -Wdate-time and -frandom-seed, and the env
>> var SOURCE_DATE_EPOCH.
>>
>
> I am using -Wdate-time and -Werror and it also happens with export
> SOURCE_DATE_EPOCH="0" now that I tried it. Should I try -frandom-seed as
> well?
>
>
After adding a hack of putting -frandom-seed=24 in the $CFLAGS, the
problematic behaviour seems to be gone:
https://github.com/shlomif/fc-solve/commit/836c3ed85c4d1ce5c2c700b93f284e6019f0c105
Thanks!
> BTW, I am using mageia linux v7 x86-64.
>
> --
> Shlomi Fish http://www.shlomifish.org/
>
> Buddha has the Chuck Norris nature.
>
> Please reply to list if it's a mailing list post - http://shlom.in/reply .
>
--
Shlomi Fish http://www.shlomifish.org/
Buddha has the Chuck Norris nature.
Please reply to list if it's a mailing list post - http://shlom.in/reply .