Re: reproducible build

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi!

> but based on the mention of -frandom-seed I suspect a better test
> case might be one whose outcome can be controlled by the option,
> which is pretty much any file compiled with -flto:
> 
> $ (set -x; cat a.c && for o in '' -frandom-seed=123; do gcc -flto -c
> $o 
> -o a1.o a.c && gcc -flto -c $o -o a2.o a.c && diff a1.o a2.o; done)
> + cat a.c
> int bar (void) { return 0; }
> + for o in ''\'''\''' -frandom-seed=123
> + gcc -flto -c -o a1.o a.c
> + gcc -flto -c -o a2.o a.c
> + diff a1.o a2.o
> Binary files a1.o and a2.o differ
> + for o in ''\'''\''' -frandom-seed=123
> + gcc -flto -c -frandom-seed=123 -o a1.o a.c
> + gcc -flto -c -frandom-seed=123 -o a2.o a.c
> + diff a1.o a2.o

Ah, thanks, that is the stuff I was looking for.

Regards,

Stephan



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux