lib/systems: fix uname.processor for powerpc and mips64#189967
Conversation
Author
|
I originally opened this PR before #189958 merged. Now that that PR has merged, the motivation for this PR is much simpler: it makes |
trofi
approved these changes
Sep 10, 2022
Author
|
mips64el needs an analogous fix, so I've pushed 4383fe1b772f138a09b3ce09999335fbee7269aa onto this PR instead of opening a separate one in order to avoid creating a merge conflict with myself. Without 4383fe1b772f138a09b3ce09999335fbee7269aa, the qemu builds needed for cross-compiling to mips64el will fail. With it, they succeed. |
Artturin
reviewed
Dec 27, 2022
Cross-compilation of anything downstream of gtk3 requires qemu (due to gobject-introspection) with --target-list=*-linux-user. Without this commit, those qemu builds will fail on a powerpc64le host due to qemu being configured with --cpu=powerpc64le instead of --cpu=ppc64le. Unfortunately the build failure message from qemu in this situation is extremely cryptic. The root cause turns out not to be the qemu expression, but rather the fact that on powerpc64le hostPlatform.uname.processor returns the gnu-name (powerpc64le) for the cpu instead of the linux-name (ppc64le) for the cpu. uname.processor on mips64el also needs adjustment -- the Linux-name is "mips64" for both big and little endian (unlike powerpc64, where the Linux-name includes a "le" suffix): ``` nix@oak:/tmp$ uname -m; lscpu | head -n2 mips64 Architecture: mips64 Byte Order: Little Endian ``` uname.processor on powerpc32 has also been adjusted.
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.
Description of changes
Cross-compilation of anything downstream of gtk3 requires qemu (due to gobject-introspection); qemu is built with
--target-list=*-linux-user. Without this commit, those qemu builds will fail on a powerpc64le buildPlatform due to qemu being configured with--cpu=powerpc64leinstead of--cpu=ppc64le. Unfortunately the build failure message from qemu in this situation is extremely cryptic.The root cause turns out not to be the qemu expression, but rather the fact that on powerpc64le
hostPlatform.uname.processorreturns the gnu-name (powerpc64le) for the cpu instead of the linux-name (ppc64le) for the cpu.Things done
./result/bin/)