URL: <https://savannah.gnu.org/patch/?10627>
Summary: [PATCH 27/31] Make compilation output reproducible
Group: MIT/GNU Scheme
Submitter: barak
Submitted: Thu 24 Sep 2026 06:03:30 PM UTC
Category: None
Priority: 5 - Normal
Status: None
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Unlocked
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: Thu 24 Sep 2026 06:03:30 PM UTC By: Barak A. Pearlmutter <barak>
Two things made every build of the same source differ.
compiler/base/toplev.scm gave each compiled file a *debugging-key* of
(random-bytevector 32), stored in both the .com and its .bci to tie them
together. The default random source is seeded from entropy during the
cold load and that state is frozen into the band, so every compiler
process run from a given band draws the same sequence -- and a band
built by the next build draws a different one. Every .com and .bci in
the tree therefore differed, by exactly those 32 bytes. Derive the key
from the input and output pathnames instead: still unique per
compilation unit, and it changes whenever the pair does, so it detects a
stale .bci at least as well as a random value did.
sf/toplev.scm stamped every .bin with the wall clock. Honour
SOURCE_DATE_EPOCH when it is set.
_______________________________________________________
File Attachments:
Name: 0027-Make-compilation-output-reproducible.patch Size: 3.9KiB
<https://file.savannah.gnu.org/file/0027-Make-compilation-output-reproducible.patch?file_id=59020>
AGPL NOTICE
These attachments are served by Savane. You can download the corresponding
source code of Savane at
https://savannah.gnu.org/source/savane-2ce82de06cddf3c312e2e260f2c97db720d76efc.tar.gz
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/patch/?10627>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
Description: PGP signature
