gmp: don't use uname to detect system features #51515
Merged
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.
Motivation for this change
On 32-bit ARM, gmp is explicitly configured with an alternative way to autodetect the build platform to work around a bug in the default system detection. This has the side effect of making it impossible to build correctly for armv6l on an armv7l machine.
Things done
This PR replaces the
configfsf.guess
script withstdenv.buildPlatform.config
. This makes the build more pure and also makes the derivation a little cleaner because we can useconfigureFlags
instead of thepreConfigure
script.I split the change into two commits, the first which avoids a mass rebuild on architectures other than 32-bit ARM, and second which cleans up the derivation with a mass rebuild (removing the
preConfigure
attribute).I would like to get the first commit into master, and the second into staging, but I'm not sure what the procedure is for that.
cc @peti @vrthra
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)