modules/musl-cross-make: fix cross-compiler reproducibility - #2173
Open
tlaurion wants to merge 1 commit into
Open
modules/musl-cross-make: fix cross-compiler reproducibility#2173tlaurion wants to merge 1 commit into
tlaurion wants to merge 1 commit into
Conversation
Three changes to make musl-cross-make produce deterministic GCC 9.4.0 output: 1. Override BUILD triplet via config.mak to prevent config.guess from probing the Docker host kernel (Docker shares host kernel, different CircleCI runners produce different triplets). 2. Export SOURCE_DATE_EPOCH from the pinned commit epoch to prevent __DATE__/__TIME__ embedding during the GCC build. 3. Pass -Wa,--no-pad-sections via CFLAGS to prevent gas 2.44 section-end padding, and --enable-compressed-debug-sections=no to disable non-deterministic debug section compression. Signed-off-by: Thierry Laurion <insurgo@riseup.net>
10 tasks
10 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The musl-cross-make version bump (fd6be58 -> 227df8b) upgraded binutils
from 2.33.1 to 2.44. Gas 2.44 introduced section-end padding by default
and changed NOP padding behavior on x86, making object file output
non-deterministic between build runs.
Fix:
Additionally fix two pre-existing reproducibility gaps:
config.guess from probing the Docker host kernel (different CI runners
have different host kernels)
to prevent DATE/TIME embedding during the GCC build
Expected: two clean builds of the same commit produce identical
cross-compiler output regardless of which CI runner executes the build.