[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20260106-nolibc-sparc32-fix-v2-1-7c5cd6b175c2@weissschuh.net>
Date: Tue, 06 Jan 2026 11:39:55 +0100
From: Thomas Weißschuh <linux@...ssschuh.net>
To: Willy Tarreau <w@....eu>, Shuah Khan <shuah@...nel.org>
Cc: linux-kselftest@...r.kernel.org, linux-kernel@...r.kernel.org,
Thomas Weißschuh <linux@...ssschuh.net>
Subject: [PATCH v2] selftests/nolibc: always build sparc32 tests with
-mcpu=v8
Since LLVM commit 39e30508a7f6 ("[Driver][Sparc] Default to -mcpu=v9 for
32-bit Linux/sparc64 (#109278)"), clang defaults to -mcpu=v9 for 32-bit
SPARC builds. -mcpu=v9 generates instructions which are not recognized
by qemu-sparc and qemu-system-sparc.
Explicitly enforce -mcpu=v8 to generate compatible code.
Signed-off-by: Thomas Weißschuh <linux@...ssschuh.net>
---
Changes in v2:
- Use -mcpu=v8
- Link to v1: https://patch.msgid.link/20260104-nolibc-sparc32-fix-v1-1-e341b06cbdb7@weissschuh.net
---
tools/testing/selftests/nolibc/Makefile.nolibc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/nolibc/Makefile.nolibc b/tools/testing/selftests/nolibc/Makefile.nolibc
index b17ba2f8fb46..f5704193038f 100644
--- a/tools/testing/selftests/nolibc/Makefile.nolibc
+++ b/tools/testing/selftests/nolibc/Makefile.nolibc
@@ -226,7 +226,7 @@ CFLAGS_mipsn32be = -EB -mabi=n32 -march=mips64r6
CFLAGS_mips64le = -EL -mabi=64 -march=mips64r6
CFLAGS_mips64be = -EB -mabi=64 -march=mips64r2
CFLAGS_loongarch = $(if $(LLVM),-fuse-ld=lld)
-CFLAGS_sparc32 = $(call cc-option,-m32)
+CFLAGS_sparc32 = $(call cc-option,-m32) -mcpu=v8
CFLAGS_sh4 = -ml -m4
ifeq ($(origin XARCH),command line)
CFLAGS_XARCH = $(CFLAGS_$(XARCH))
---
base-commit: 8c688f07d5d77d669a1cd67863e91a99fdbc8b6e
change-id: 20260104-nolibc-sparc32-fix-42b892ab1c0f
Best regards,
--
Thomas Weißschuh <linux@...ssschuh.net>
Powered by blists - more mailing lists