GCC produces slightly different .o files on two consecutive runs in certain conditions

Shlomi Fish shlomif@gmail.com
Tue Jan 29 00:23:00 GMT 2019


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 .



More information about the Gcc-help mailing list