From 3cc7ed909caf6e59f925753016dfe5c53520088a Mon Sep 17 00:00:00 2001 From: Red Bear OS Date: Sun, 28 Jun 2026 04:40:40 +0300 Subject: [PATCH] bios: add -Zunstable-options for custom JSON target spec Rust nightly requires -Zunstable-options for custom target JSON specs (such as x86-unknown-none.json). Without it, the build fails with: error: error loading target specification: custom targets are unstable and require `-Zunstable-options` UEFI already uses the built-in x86_64-unknown-uefi target, so it didn't need this flag. The kernel recipe already has this fix; the bootloader BIOS Makefile was missing it. --- mk/x86-unknown-none.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mk/x86-unknown-none.mk b/mk/x86-unknown-none.mk index 16e949de93..7071d8738b 100644 --- a/mk/x86-unknown-none.mk +++ b/mk/x86-unknown-none.mk @@ -7,7 +7,7 @@ all: $(BUILD)/bootloader.bin $(BUILD)/libbootloader.a: $(SOURCE)/Cargo.toml $(SOURCE)/Cargo.lock $(shell find $(SOURCE)/src -type f) mkdir -p "$(BUILD)" - env RUSTFLAGS="--cfg aes_force_soft" \ + env RUSTFLAGS="--cfg aes_force_soft -Zunstable-options" \ cargo rustc \ --manifest-path="$<" \ -Z build-std=core,alloc \ @@ -20,7 +20,7 @@ $(BUILD)/libbootloader.a: $(SOURCE)/Cargo.toml $(SOURCE)/Cargo.lock $(shell find $(BUILD)/libbootloader-live.a: $(SOURCE)/Cargo.toml $(SOURCE)/Cargo.lock $(shell find $(SOURCE)/src -type f) mkdir -p "$(BUILD)" - env RUSTFLAGS="--cfg aes_force_soft" \ + env RUSTFLAGS="--cfg aes_force_soft -Zunstable-options" \ cargo rustc \ --manifest-path="$<" \ -Z build-std=core,alloc \