lib/systems: use correct config for armv7l-hf-multiplatform #47980
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
Elaborating
lib.systems.example.armv7l-hf-multiplatform
results in unexpected values for some of the fields, breaking cross-compilation of certain packages. In particularlinux_hardkernel_4_14
fails because it usesmeta.platforms
to restrict the host system toarmv7l-linux
andhostPlatform.system
hasarmv7a-linux
instead.This command reproduces the problem:
Before this PR:
The simple fix seems to be to change
config
toarmv7l-unknown-linux-gnueabihf
as is done by this PR, but I'm not confident that this is the correct fix.I don't really know what the difference between the two triplets is, and why it was chosen in the first place. a02be2b seems like it could have introduced this problem, but before that commit
system
wasarm-linux
, which is still wrong. Going further back, 171c7f0 changedconfig
fromarmv7l-unknown-linux-gnueabi
toarm-linux-gnueabihf
, but the cross compilation infrastructure has changed so much since then that I'm not sure what implications that had.After this PR:
I have tested this only on cross-compiled kernels, which build correctly. I'm afraid it could break packages that use
parsed.cpu.name
.cc @Ericson2314
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)