I wanted to give nixpkgs staging-next a try (rev fcff3d7883a38ef71832899085ba365658c96867).
It looks like new rustc there (1.75.0) is not happy with the kernel build:
#
# configuration written to .config
#
make[1]: Leaving directory '/build/source/build'
make[1]: Entering directory '/build/source/build'
GEN Makefile
HOSTCC scripts/dtc/dtc.o
HOSTCC scripts/dtc/flattree.o
HOSTCC scripts/dtc/fstree.o
HOSTCC scripts/dtc/data.o
HOSTCC scripts/dtc/livetree.o
HOSTCC scripts/dtc/treesource.o
HOSTCC scripts/dtc/srcpos.o
HOSTCC scripts/dtc/checks.o
HOSTCC scripts/dtc/util.o
LEX scripts/dtc/dtc-lexer.lex.c
YACC scripts/dtc/dtc-parser.tab.[ch]
HOSTCC scripts/dtc/dtc-lexer.lex.o
HOSTCC scripts/dtc/dtc-parser.tab.o
HOSTLD scripts/dtc/dtc
HOSTCC scripts/dtc/libfdt/fdt.o
HOSTCC scripts/dtc/libfdt/fdt_ro.o
HOSTCC scripts/dtc/libfdt/fdt_wip.o
HOSTCC scripts/dtc/libfdt/fdt_sw.o
HOSTCC scripts/dtc/libfdt/fdt_rw.o
HOSTCC scripts/dtc/libfdt/fdt_strerror.o
HOSTCC scripts/dtc/libfdt/fdt_empty_tree.o
HOSTCC scripts/dtc/libfdt/fdt_addresses.o
HOSTCC scripts/dtc/libfdt/fdt_overlay.o
HOSTCC scripts/dtc/fdtoverlay.o
HOSTLD scripts/dtc/fdtoverlay
HOSTRUSTC scripts/generate_rust_target
UPD scripts/target.json
HOSTCC scripts/kallsyms
HOSTCC scripts/sorttable
HOSTCC scripts/asn1_compiler
UPD include/config/kernel.release
WRAP arch/arm64/include/generated/uapi/asm/kvm_para.h
WRAP arch/arm64/include/generated/uapi/asm/errno.h
WRAP arch/arm64/include/generated/uapi/asm/ioctl.h
WRAP arch/arm64/include/generated/uapi/asm/ioctls.h
WRAP arch/arm64/include/generated/uapi/asm/ipcbuf.h
WRAP arch/arm64/include/generated/uapi/asm/msgbuf.h
WRAP arch/arm64/include/generated/uapi/asm/poll.h
WRAP arch/arm64/include/generated/uapi/asm/resource.h
WRAP arch/arm64/include/generated/uapi/asm/sembuf.h
WRAP arch/arm64/include/generated/uapi/asm/shmbuf.h
WRAP arch/arm64/include/generated/uapi/asm/siginfo.h
WRAP arch/arm64/include/generated/uapi/asm/socket.h
WRAP arch/arm64/include/generated/uapi/asm/sockios.h
WRAP arch/arm64/include/generated/uapi/asm/stat.h
WRAP arch/arm64/include/generated/uapi/asm/swab.h
WRAP arch/arm64/include/generated/uapi/asm/termbits.h
WRAP arch/arm64/include/generated/uapi/asm/termios.h
WRAP arch/arm64/include/generated/uapi/asm/types.h
WRAP arch/arm64/include/generated/asm/early_ioremap.h
WRAP arch/arm64/include/generated/asm/mcs_spinlock.h
WRAP arch/arm64/include/generated/asm/qrwlock.h
WRAP arch/arm64/include/generated/asm/qspinlock.h
WRAP arch/arm64/include/generated/asm/parport.h
WRAP arch/arm64/include/generated/asm/user.h
WRAP arch/arm64/include/generated/asm/bugs.h
WRAP arch/arm64/include/generated/asm/delay.h
WRAP arch/arm64/include/generated/asm/div64.h
WRAP arch/arm64/include/generated/asm/dma-mapping.h
WRAP arch/arm64/include/generated/asm/dma.h
WRAP arch/arm64/include/generated/asm/emergency-restart.h
WRAP arch/arm64/include/generated/asm/hw_irq.h
WRAP arch/arm64/include/generated/asm/irq_regs.h
WRAP arch/arm64/include/generated/asm/kdebug.h
WRAP arch/arm64/include/generated/asm/kmap_size.h
WRAP arch/arm64/include/generated/asm/local.h
WRAP arch/arm64/include/generated/asm/local64.h
WRAP arch/arm64/include/generated/asm/mmiowb.h
WRAP arch/arm64/include/generated/asm/msi.h
WRAP arch/arm64/include/generated/asm/serial.h
WRAP arch/arm64/include/generated/asm/softirq_stack.h
WRAP arch/arm64/include/generated/asm/switch_to.h
WRAP arch/arm64/include/generated/asm/trace_clock.h
WRAP arch/arm64/include/generated/asm/unaligned.h
WRAP arch/arm64/include/generated/asm/vga.h
UPD include/generated/uapi/linux/version.h
UPD include/generated/utsrelease.h
UPD include/generated/compile.h
GEN arch/arm64/include/generated/asm/cpucaps.h
GEN arch/arm64/include/generated/asm/sysreg-defs.h
CC scripts/mod/empty.o
HOSTCC scripts/mod/mk_elfconfig
MKELF scripts/mod/elfconfig.h
HOSTCC scripts/mod/modpost.o
CC scripts/mod/devicetable-offsets.s
UPD scripts/mod/devicetable-offsets.h
HOSTCC scripts/mod/file2alias.o
HOSTCC scripts/mod/sumversion.o
HOSTLD scripts/mod/modpost
UPD include/generated/timeconst.h
CC kernel/bounds.s
UPD include/generated/bounds.h
CC arch/arm64/kernel/asm-offsets.s
UPD include/generated/asm-offsets.h
CALL ../scripts/checksyscalls.sh
CHKSHA1 ../include/linux/atomic/atomic-arch-fallback.h
CHKSHA1 ../include/linux/atomic/atomic-instrumented.h
CHKSHA1 ../include/linux/atomic/atomic-long.h
LDS arch/arm64/kernel/vdso/vdso.lds
CC arch/arm64/kernel/vdso/vgettimeofday.o
AS arch/arm64/kernel/vdso/note.o
AS arch/arm64/kernel/vdso/sigreturn.o
LD arch/arm64/kernel/vdso/vdso.so.dbg
/nix/store/wjkn3fmykn68rbpnamj9kzgw263xcga2-binutils-2.40/bin/ld: warning: -z relro ignored
VDSOSYM include/generated/vdso-offsets.h
OBJCOPY arch/arm64/kernel/vdso/vdso.so
***
*** Rust compiler 'rustc' is too new. This may or may not work.
*** Your version: 1.75.0
*** Expected version: 1.71.1
***
***
*** Rust bindings generator 'bindgen' is too new. This may or may not work.
*** Your version: 0.69.1
*** Expected version: 0.65.1
***
***
*** Please see Documentation/rust/quick-start.rst for details
*** on how to set up the Rust support.
***
RUSTC L rust/core.o
warning: unknown and unstable feature specified for `-Ctarget-feature`: `fp-armv8`
|
= note: it is still passed through to the codegen backend, but use of this feature might be unsound and the behavior of this feature can change in the future
= help: consider filing a feature request
warning: 1 warning emitted
EXPORTS rust/exports_core_generated.h
RUSTC P rust/libmacros.so
BINDGEN rust/bindings/bindings_generated.rs
BINDGEN rust/bindings/bindings_helpers_generated.rs
RUSTC L rust/compiler_builtins.o
warning: the feature `compiler_builtins` is internal to the compiler or standard library
--> /build/source/rust/compiler_builtins.rs:22:12
|
22 | #![feature(compiler_builtins)]
| ^^^^^^^^^^^^^^^^^
|
= note: using it is strongly discouraged
= note: `#[warn(internal_features)]` on by default
warning: unknown and unstable feature specified for `-Ctarget-feature`: `fp-armv8`
|
= note: it is still passed through to the codegen backend, but use of this feature might be unsound and the behavior of this feature can change in the future
= help: consider filing a feature request
warning: 2 warnings emitted
RUSTC L rust/alloc.o
error[E0432]: unresolved imports `core::ops::Generator`, `core::ops::GeneratorState`
--> /build/source/rust/alloc/boxed.rs:164:54
|
164 | CoerceUnsized, Deref, DerefMut, DispatchFromDyn, Generator, GeneratorState, Receiver,
| ^^^^^^^^^ ^^^^^^^^^^^^^^ no `GeneratorState` in `ops`
| |
| no `Generator` in `ops`
warning: the feature `allocator_internals` is internal to the compiler or standard library
--> /build/source/rust/alloc/lib.rs:175:12
|
175 | #![feature(allocator_internals)]
| ^^^^^^^^^^^^^^^^^^^
|
= note: using it is strongly discouraged
= note: `#[warn(internal_features)]` on by default
warning: the feature `allow_internal_unstable` is internal to the compiler or standard library
--> /build/source/rust/alloc/lib.rs:176:12
|
176 | #![feature(allow_internal_unstable)]
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= note: using it is strongly discouraged
warning: the feature `lang_items` is internal to the compiler or standard library
--> /build/source/rust/alloc/lib.rs:189:12
|
189 | #![feature(lang_items)]
| ^^^^^^^^^^
|
= note: using it is strongly discouraged
warning: the feature `rustc_allow_const_fn_unstable` is internal to the compiler or standard library
--> /build/source/rust/alloc/lib.rs:195:12
|
195 | #![feature(rustc_allow_const_fn_unstable)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: using it is strongly discouraged
warning: the feature `rustc_attrs` is internal to the compiler or standard library
--> /build/source/rust/alloc/lib.rs:196:12
|
196 | #![feature(rustc_attrs)]
| ^^^^^^^^^^^
|
= note: using it is strongly discouraged
warning: the feature `staged_api` is internal to the compiler or standard library
--> /build/source/rust/alloc/lib.rs:198:12
|
198 | #![feature(staged_api)]
| ^^^^^^^^^^
|
= note: using it is strongly discouraged
warning: unused imports: `min_align_of_val`, `size_of_val`
--> /build/source/rust/alloc/alloc.rs:9:24
|
9 | use core::intrinsics::{min_align_of_val, size_of_val};
| ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
warning: unused import: `core::ptr::Unique`
--> /build/source/rust/alloc/alloc.rs:11:5
|
11 | use core::ptr::Unique;
| ^^^^^^^^^^^^^^^^^
error: aborting due to previous error; 8 warnings emitted
For more information about this error, try `rustc --explain E0432`.
make[3]: *** [../rust/Makefile:443: rust/alloc.o] Error 1
make[2]: *** [/build/source/Makefile:1208: prepare] Error 2
make[1]: *** [/build/source/Makefile:234: __sub-make] Error 2
make[1]: Leaving directory '/build/source/build'
make: *** [Makefile:234: __sub-make] Error 2
error: build of '/nix/store/79p0j8mpy71kk4c4ia0ybvi3jmr9649w-linux-6.6.0-asahi.drv' on 'ssh://root@172.20.26.12' failed: builder for '/nix/store/79p0j8mpy71kk4c4ia0ybvi3jmr9649w-linux-6.6.0-asahi.drv' failed with exit code 2
error: builder for '/nix/store/79p0j8mpy71kk4c4ia0ybvi3jmr9649w-linux-6.6.0-asahi.drv' failed with exit code 1;
last 10 log lines:
> | ^^^^^^^^^^^^^^^^^
>
> error: aborting due to previous error; 8 warnings emitted
>
> For more information about this error, try `rustc --explain E0432`.
> make[3]: *** [../rust/Makefile:443: rust/alloc.o] Error 1
> make[2]: *** [/build/source/Makefile:1208: prepare] Error 2
> make[1]: *** [/build/source/Makefile:234: __sub-make] Error 2
> make[1]: Leaving directory '/build/source/build'
> make: *** [Makefile:234: __sub-make] Error 2
For full logs, run 'nix log /nix/store/79p0j8mpy71kk4c4ia0ybvi3jmr9649w-linux-6.6.0-asahi.drv'.
I wanted to give nixpkgs staging-next a try (rev fcff3d7883a38ef71832899085ba365658c96867).
It looks like new rustc there (1.75.0) is not happy with the kernel build: