Closed zzywysm closed 1 year ago
Nixpkgs still uses gcc-9.3 for aarch64. There have been efforts to upgrade it but they didn't pan out. I'm not sufficiently competent in that area to figure out why.
Is there some benefit to using gcc 11 or 12 just for the kernel? That would require compiling another compiler.
Here is a proposed fix from another author, which I'm going to try out on my own Mac:
https://github.com/helsinki-systems/nixpkgs/tree/fix/aarch64-linux-gcc10
(Contrary to the branch name, it looks like this would move nixpkgs to gcc-11.x for aarch64.)
The root cause seems to be that this file hasn't been updated in a while:
https://github.com/NixOS/nixpkgs/commits/master/pkgs/stdenv/linux/bootstrap-files/aarch64.nix
...and it defines where the bootstrap files get copied from. Because the file is out of date, it's incompatible with newer gcc (and glibc?)
References: https://github.com/NixOS/nixpkgs/issues/36947 https://github.com/NixOS/nixpkgs/pull/36948 https://github.com/NixOS/nixpkgs/issues/40797
https://github.com/NixOS/nixpkgs/issues/108111 https://github.com/NixOS/nixpkgs/issues/108305 https://github.com/NixOS/nixpkgs/pull/187225
This will eventually get fixed with https://github.com/NixOS/nixpkgs/pull/209870 so closing.
At the moment, the kernel gets built with gcc-9.3. It would be nice if the kernel were built with gcc 11 or gcc 12 instead.