-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
linux: build with GCC 13 for loongarch64 #239745
Conversation
Linux requires either binutils ≤ 2.39 or GCC ≥ 13 to build for loongarch64. Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0d8dad7048611e5ba02ae8519539ce4b8b1482d3 Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=11cd8a648301af0ad6937ed9493519d1e93fd4c8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Worth adding a comment right into the .nix
fiiles as well? Otherwise LGTM.
I prefer to upgrade the stdenv of loongarch64 to GCC 13 instead of specifying the use of gcc13Stdenv when compiling Linux kernels. As a new architecture, loongarch64 can undoubtedly get new feature support by using the new version of gcc In a blog of loongson community developer recommends using the 13.0.0 snapshot release for new psABI support. (It should be noted that this blog is updated in 2022-11) In practice, loongarchlinux as a distribution specifically designed for loongarch, uses GCC 13 and does not provide GCC 12 or any older versions. The requirement of using GCC >= 13 for Linux kernels indicates that we need to upgrade the gcc in stdenv as well. |
Agree. #245169 creates a designated place for this (and lets you make changes like this via overlays instead of having to edit nixpkgs). Also, when we bump to gcc14 by default, unless somebody remembers to change (all four of) these, we'll wind up with Loongarch using an older gcc than the default, rather than newer. The If there is a strong reason for wanting gcc13 only for the kernel but not elsewhere, we should put that change on just one line in one place somewhere (like |
I guess it's not necessary anymore. |
gcc 13 is default now |
Description of changes
Linux requires either binutils ≤ 2.39 or GCC ≥ 13 to build for loongarch64.
Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0d8dad7048611e5ba02ae8519539ce4b8b1482d3
Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=11cd8a648301af0ad6937ed9493519d1e93fd4c8
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)