[QBS] Follow-up on reproducible builds
Stephan Gatzka
stephan.gatzka at gmail.com
Mon Aug 24 06:44:59 CEST 2015
Hi,
We still lack a test for reproducible builds. I asked the gcc guys and
got the answer, that pretty much anything compiled with -flto leads to
different binaries.
So I tried it out:
cat a.c:
int bar (void) { return 0; }
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
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
Unfortunately, this example only works for gcc, not clang. Clang still
produces identical binaries.
Regards,
Stephan
More information about the Qbs
mailing list