From 0da5da13df3a0891b2c094024846ac2352e4fa51 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 21 Oct 2026 22:04:01 -0700 Subject: [PATCH] klibc: Mark incompatible with riscv32 klibc only has a riscv64 port, which hardcodes KLIBCBITSIZE = 64 and uses 64-bit loads and stores in its assembly, and upstream has no riscv32 port. With KLIBC_ARCH defaulting to TARGET_ARCH, the build fails: make[1]: *** No rule to make target '.../usr/klibc/arch/riscv32/MCONFIG'. Stop. Mark klibc and the recipes sharing klibc.inc incompatible with riscv32 so they are skipped instead of failing to build. Also skip all recipes inheriting klibc AI-Generated: Uses Claude Code Signed-off-by: Khem Raj --- meta-initramfs/classes/klibc.bbclass | 3 +++ meta-initramfs/recipes-devtools/klibc/klibc.inc | 2 ++ 2 files changed, 5 insertions(+) diff --git a/meta-initramfs/classes/klibc.bbclass b/meta-initramfs/classes/klibc.bbclass index ad5d9019fd..7bde5eb74e 100644 --- a/meta-initramfs/classes/klibc.bbclass +++ b/meta-initramfs/classes/klibc.bbclass @@ -23,3 +23,6 @@ LDFLAGS:append:toolchain-clang:libc-klibc:arm = " --rtlib=libgcc --unwindlib=lib LDFLAGS[export] = "1" OVERRIDES =. "libc-klibc:" + +# klibc is not yet ported to riscv32 +COMPATIBLE_HOST:riscv32 = "null" diff --git a/meta-initramfs/recipes-devtools/klibc/klibc.inc b/meta-initramfs/recipes-devtools/klibc/klibc.inc index 24f5ee0c7b..c46a8685aa 100644 --- a/meta-initramfs/recipes-devtools/klibc/klibc.inc +++ b/meta-initramfs/recipes-devtools/klibc/klibc.inc @@ -78,3 +78,5 @@ KLIBC_ARCH:powerpc = "ppc" KLIBC_ARCH:powerpc64 = "ppc64" KLIBC_ARCH:powerpc64le = "ppc64" THIS_LIBKLIBC = "libklibc (= ${PV}-${PR})" + +COMPATIBLE_HOST:riscv32 = "null"