CUBELinux.0.1: name the release, and build with this box's rustc
The tree is Linux 6.19.3 with the changes this machine's toolchain needs, and nothing else. No CUBE code yet — this is the base the coordinate interface will be built on, so it starts from a known-good bootable kernel. Naming: - VERSION/PATCHLEVEL/SUBLEVEL stay 6.19.3 (visible in `make kernelversion`), while the release string setlocalversion composes is CUBELinux.0.1, so `uname -r` and /lib/modules report this product rather than a Linux point release. The SCM suffix still applies: a dirty tree says so. rustc compatibility (rustc 1.100.0-nightly, clang 19.1.7): - scripts/generate_rust_target.rs emitted `"rustc-abi": "x86-softfloat"`, which this rustc rejects; it is `softfloat` now. - rust/Makefile's cmd_rustc_library did not pass -Zunstable-options, so the custom target spec would not load at all. - the generated bindings declare `strlen` with the kernel target's `c_char` (u8, from -funsigned-char) while rustc expects `*const i8`; the newer suspicious_runtime_symbol_definitions lint fires on that and -D warnings makes it fatal. Scoped to bindings.o and uapi.o, not to handwritten code. - three `'static` bounds the abstractions now need (irq handlers). - str.rs imported alloc::flags::* which prelude::* already provides, and `#![feature(used_with_arg)]` is stale now that the feature is stable; both are unused-feature/unused-import errors under -D warnings. Gates: bzImage builds (14,697,472 bytes) with CONFIG_RUST=y, virtio-blk and a serial console built in. Boot test in QEMU is next.
This commit is contained in:
+5
-2
@@ -556,6 +556,7 @@ quiet_cmd_rustc_library = $(if $(skip_clippy),RUSTC,$(RUSTC_OR_CLIPPY_QUIET)) L
|
||||
cmd_rustc_library = \
|
||||
OBJTREE=$(abspath $(objtree)) \
|
||||
$(if $(skip_clippy),$(RUSTC),$(RUSTC_OR_CLIPPY)) \
|
||||
-Zunstable-options \
|
||||
$(filter-out $(skip_flags),$(rust_flags)) $(rustc_target_flags) \
|
||||
--emit=dep-info=$(depfile) --emit=obj=$@ \
|
||||
--emit=metadata=$(dir $@)$(patsubst %.o,lib%.rmeta,$(notdir $@)) \
|
||||
@@ -661,7 +662,9 @@ $(obj)/ffi.o: private skip_gendwarfksyms = 1
|
||||
$(obj)/ffi.o: $(src)/ffi.rs $(obj)/compiler_builtins.o FORCE
|
||||
+$(call if_changed_rule,rustc_library)
|
||||
|
||||
$(obj)/bindings.o: private rustc_target_flags = --extern ffi --extern pin_init
|
||||
# bindgen's output trips a newer rustc lint over `c_char` width (see below), so the
|
||||
# declaration is allowed here rather than in the flags that cover handwritten code.
|
||||
$(obj)/bindings.o: private rustc_target_flags = --extern ffi --extern pin_init --allow=suspicious_runtime_symbol_definitions
|
||||
$(obj)/bindings.o: $(src)/bindings/lib.rs \
|
||||
$(obj)/ffi.o \
|
||||
$(obj)/pin_init.o \
|
||||
@@ -669,7 +672,7 @@ $(obj)/bindings.o: $(src)/bindings/lib.rs \
|
||||
$(obj)/bindings/bindings_helpers_generated.rs FORCE
|
||||
+$(call if_changed_rule,rustc_library)
|
||||
|
||||
$(obj)/uapi.o: private rustc_target_flags = --extern ffi --extern pin_init
|
||||
$(obj)/uapi.o: private rustc_target_flags = --extern ffi --extern pin_init --allow=suspicious_runtime_symbol_definitions
|
||||
$(obj)/uapi.o: private skip_gendwarfksyms = 1
|
||||
$(obj)/uapi.o: $(src)/uapi/lib.rs \
|
||||
$(obj)/ffi.o \
|
||||
|
||||
Reference in New Issue
Block a user