From nobody Mon Jun 15 02:50:09 2026 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4A9EA3B6C08; Tue, 28 Apr 2026 15:38:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=159.69.126.157 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777390730; cv=none; b=I1SqKvEZicCG4MlwQKkvRYy/RxiGYBXtdlZGxmsSlsgcVezmQVZqMjb0D1FYP/h3mPjIbOttocr4iZmAHUH0gtpnUFiRikhj5wMW5VsgV2qe+sj4XDEJpR2PY6tjYQPdyVOn0KZMoJihL5TCD7rK22/ojDA/TS2sbrlwTjpXBbw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777390730; c=relaxed/simple; bh=uVoVF2tV01dWPb42R0kcZ/Bylx24JPlETzLgOfFj1jc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=u0m3bgQq5/aGoWs3rM14mM9DnKP+S0cKqu60SpC0T4JEfngxOk4qjKpptzhMFbsoDICrTjwt9ZKAcDMM3kwD8J43zhWt9H8GzfRu57oi6qeWqpW7ahCgb2ZrUSMYZtCfr8tt/O6jJX52382LoJ5n7EQ8V8GxFQ+PuvLtuJITs2Q= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net; spf=pass smtp.mailfrom=weissschuh.net; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b=eH+3I9wT; arc=none smtp.client-ip=159.69.126.157 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="eH+3I9wT" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1777390723; bh=uVoVF2tV01dWPb42R0kcZ/Bylx24JPlETzLgOfFj1jc=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=eH+3I9wTGj115DOBnLccn3Tnjxvi29RQpT5A3JzJHo7uErQZqURx0nNp/VZC/3nEz 0LrkBOjTpkawaICAm3Qkb48f4Lb2SEcxM+hXI4Fr6GSiCqiCY1bhX9f7x/PHxA9sdB yF5OHdJ8YzOaQOkNS0PjFDjL1wk7V/yCz+PlO6wA= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Tue, 28 Apr 2026 17:38:29 +0200 Subject: [PATCH v5 1/2] selftests/nolibc: avoid function pointer comparisons Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260428-nolibc-hppa-v5-1-d843d573111a@weissschuh.net> References: <20260428-nolibc-hppa-v5-0-d843d573111a@weissschuh.net> In-Reply-To: <20260428-nolibc-hppa-v5-0-d843d573111a@weissschuh.net> To: "James E.J. Bottomley" , Helge Deller , Willy Tarreau Cc: linux-kernel@vger.kernel.org, linux-parisc@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1777390721; l=1903; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=uVoVF2tV01dWPb42R0kcZ/Bylx24JPlETzLgOfFj1jc=; b=8C5w2/tYrRXAhpRy5hkWFAkW+RRQRI8O6pXLLJSnHKaR+L2iERIW2oFOVS5tmX1crrwawJss9 GmyNItUHEVFCIlOinfXapmMFJnM6XH5T5HE1gi+nqGMTmp9MDbX1RNs X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= The upcoming parisc support would require libgcc to implement function pointer comparisons. As we try to avoid the libgcc dependency rework the logic to work without such comparisons. Signed-off-by: Thomas Wei=C3=9Fschuh Acked-by: Willy Tarreau --- tools/testing/selftests/nolibc/nolibc-test.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/tools/testing/selftests/nolibc/nolibc-test.c b/tools/testing/s= elftests/nolibc/nolibc-test.c index 08610cacf030..1db6e8d55c16 100644 --- a/tools/testing/selftests/nolibc/nolibc-test.c +++ b/tools/testing/selftests/nolibc/nolibc-test.c @@ -649,20 +649,25 @@ int expect_str_buf_eq(size_t expr, const char *buf, s= ize_t val, int llen, const return 0; } =20 +enum strtox_func { + strtox_func_strtol, + strtox_func_strtoul, +}; + #define EXPECT_STRTOX(cond, func, input, base, expected, chars, expected_e= rrno) \ - do { if (!(cond)) result(llen, SKIPPED); else ret +=3D expect_strtox(llen= , func, input, base, expected, chars, expected_errno); } while (0) + do { if (!(cond)) result(llen, SKIPPED); else ret +=3D expect_strtox(llen= , strtox_func_ ## func, input, base, expected, chars, expected_errno); } wh= ile (0) =20 static __attribute__((unused)) -int expect_strtox(int llen, void *func, const char *input, int base, intma= x_t expected, int expected_chars, int expected_errno) +int expect_strtox(int llen, enum strtox_func func, const char *input, int = base, intmax_t expected, int expected_chars, int expected_errno) { char *endptr; int actual_errno, actual_chars; intmax_t r; =20 errno =3D 0; - if (func =3D=3D strtol) { + if (func =3D=3D strtox_func_strtol) { r =3D strtol(input, &endptr, base); - } else if (func =3D=3D strtoul) { + } else if (func =3D=3D strtox_func_strtoul) { r =3D strtoul(input, &endptr, base); } else { result(llen, FAIL); --=20 2.54.0 From nobody Mon Jun 15 02:50:09 2026 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 591463988F9; Tue, 28 Apr 2026 15:38:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=159.69.126.157 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777390730; cv=none; b=sd0+uJrDgFq/tl7JIGpOE7t8u51aW0vEwFF7IyZuwdznh5RYOjKDA6EaNpCmAr+jGLkkJIqY82JO+sGgBrgUHXFTY1naRcN3S4YSzIqXmevF0tuUYOQ1MnGEoxyhDsPMpHcb+j/5cuKDakAOqq9IUvWTfV/6Vq/dPfr595qfK5A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777390730; c=relaxed/simple; bh=Cwa+KI7N5ypoYHEe28OfYFCTfkYZC8XUb57ZQvWP8Og=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Zz3KWWEdgRNhaJchgACpo3D26jq8DHHEY02Q5emfyGRgg8v8PU296o/Cic8TyYIpkpU9yqi5hgji/+oeFMorHhERPudMb7FuMQ7duN7vi2f1qJ0A9eg27yu2NoaoTM5DPGuUgRFNOrvLXAR2JmTOAHXALFQR5GmSMAL1Kc5VidM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net; spf=pass smtp.mailfrom=weissschuh.net; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b=G+++qXM0; arc=none smtp.client-ip=159.69.126.157 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="G+++qXM0" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1777390723; bh=Cwa+KI7N5ypoYHEe28OfYFCTfkYZC8XUb57ZQvWP8Og=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=G+++qXM0jK7c/Cd+eIL2aoBbNbfNLDPrI016A6ezJnInQSBK3sGztKTX9zX4JTICE XUqlil4fVBynz6mJo1qZ/gyE9TlbMI8LASEDRewtB28mDVMtABc90n5Wz6X03ltWT2 i6PDeYxQ+YkeBrB0ZDWiRiC4td7bdazVBlDzsWT4= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Tue, 28 Apr 2026 17:38:30 +0200 Subject: [PATCH v5 2/2] tools/nolibc: add support for 32-bit parisc Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260428-nolibc-hppa-v5-2-d843d573111a@weissschuh.net> References: <20260428-nolibc-hppa-v5-0-d843d573111a@weissschuh.net> In-Reply-To: <20260428-nolibc-hppa-v5-0-d843d573111a@weissschuh.net> To: "James E.J. Bottomley" , Helge Deller , Willy Tarreau Cc: linux-kernel@vger.kernel.org, linux-parisc@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1777390721; l=15230; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=Cwa+KI7N5ypoYHEe28OfYFCTfkYZC8XUb57ZQvWP8Og=; b=O6sczsoLu3w1DplpUHegeGvfZLGHMd7PtMBJErXBzGWMy6hi821IIVblD2F22YWFDeMA+6CbG c8LF6D0wwJ1BsYCdjZUoEj+wHmEpSS8uyy3lfOJerASAyRAhbPewO56 X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= Extend nolibc to target the 32-bit parisc architecture. 64-bit is not yet supported. Signed-off-by: Thomas Wei=C3=9Fschuh Acked-by: Willy Tarreau --- tools/include/nolibc/Makefile | 2 +- tools/include/nolibc/arch-parisc.h | 185 +++++++++++++++++++++= ++++ tools/include/nolibc/arch.h | 2 + tools/testing/selftests/nolibc/Makefile.nolibc | 6 + tools/testing/selftests/nolibc/run-tests.sh | 8 +- 5 files changed, 201 insertions(+), 2 deletions(-) diff --git a/tools/include/nolibc/Makefile b/tools/include/nolibc/Makefile index 872c318f50d4..b7e987abad52 100644 --- a/tools/include/nolibc/Makefile +++ b/tools/include/nolibc/Makefile @@ -17,7 +17,7 @@ endif # it defaults to this nolibc directory. OUTPUT ?=3D $(CURDIR)/ =20 -architectures :=3D arm arm64 loongarch m68k mips powerpc riscv s390 sh spa= rc x86 +architectures :=3D arm arm64 loongarch m68k mips parisc powerpc riscv s390= sh sparc x86 arch_files :=3D arch.h $(addsuffix .h, $(addprefix arch-, $(architectures)= )) all_files :=3D \ alloca.h \ diff --git a/tools/include/nolibc/arch-parisc.h b/tools/include/nolibc/arch= -parisc.h new file mode 100644 index 000000000000..417043ecbc53 --- /dev/null +++ b/tools/include/nolibc/arch-parisc.h @@ -0,0 +1,185 @@ +/* SPDX-License-Identifier: LGPL-2.1 OR MIT */ +/* + * parisc/hppa (32-bit) specific definitions for NOLIBC + * Copyright (C) 2026 Thomas Wei=C3=9Fschuh + */ + +#ifndef _NOLIBC_ARCH_PARISC_H +#define _NOLIBC_ARCH_PARISC_H + +#if defined(__LP64__) +#error 64-bit not supported +#endif + +#include "compiler.h" +#include "crt.h" + +/* Syscalls for parisc : + * - syscall number is passed in r20 + * - arguments are in r26 to r21 + * - the system call is performed by calling "ble 0x100(%sr2, %r0)", + * the instruction after that is in the delay slot and executed before + * the jump to 0x100 actually happens, use it to load the syscall numb= er + * - syscall return comes in r28 + * - the arguments are cast to long and assigned into the target + * registers which are then simply passed as registers to the asm code, + * so that we don't have to experience issues with register constraint= s. + */ + +#define _NOLIBC_SYSCALL_CLOBBERLIST \ + "memory", "%r1", "%r2", "%r4", "%r20", "%r29", "%r31" + +#define __nolibc_syscall0(num) = \ +({ = \ + register long _ret __asm__ ("r28"); \ + \ + __asm__ volatile ( \ + "ble 0x100(%%sr2, %%r0)\n\t" \ + "copy %1, %%r20\n\t" \ + : "=3Dr"(_ret) \ + : "r"(num) \ + : _NOLIBC_SYSCALL_CLOBBERLIST, \ + "%r21", "%r22", "%r23", "%r24", "%r25", "%r26" \ + ); \ + _ret; \ +}) + +#define __nolibc_syscall1(num, arg1) = \ +({ = \ + register long _ret __asm__ ("r28"); \ + register long _arg1 __asm__ ("r26") =3D (long)(arg1); \ + \ + __asm__ volatile ( \ + "ble 0x100(%%sr2, %%r0)\n\t" \ + "copy %2, %%r20\n\t" \ + : "=3Dr"(_ret), \ + "+r"(_arg1) \ + : "r"(num) \ + : _NOLIBC_SYSCALL_CLOBBERLIST, \ + "%r21", "%r22", "%r23", "%r24", "%r25" \ + ); \ + _ret; \ +}) + +#define __nolibc_syscall2(num, arg1, arg2) = \ +({ = \ + register long _ret __asm__ ("r28"); \ + register long _arg1 __asm__ ("r26") =3D (long)(arg1); \ + register long _arg2 __asm__ ("r25") =3D (long)(arg2); \ + \ + __asm__ volatile ( \ + "ble 0x100(%%sr2, %%r0)\n\t" \ + "copy %3, %%r20\n\t" \ + : "=3Dr"(_ret), \ + "+r"(_arg1), "+r"(_arg2) \ + : "r"(num) \ + : _NOLIBC_SYSCALL_CLOBBERLIST, \ + "%r21", "%r22", "%r23", "%r24" \ + ); \ + _ret; \ +}) + +#define __nolibc_syscall3(num, arg1, arg2, arg3) = \ +({ = \ + register long _ret __asm__ ("r28"); \ + register long _arg1 __asm__ ("r26") =3D (long)(arg1); \ + register long _arg2 __asm__ ("r25") =3D (long)(arg2); \ + register long _arg3 __asm__ ("r24") =3D (long)(arg3); \ + \ + __asm__ volatile ( \ + "ble 0x100(%%sr2, %%r0)\n\t" \ + "copy %4, %%r20\n\t" \ + : "=3Dr"(_ret), \ + "+r"(_arg1), "+r"(_arg2), "+r"(_arg3) \ + : "r"(num) \ + : _NOLIBC_SYSCALL_CLOBBERLIST, \ + "%r21", "%r22", "%r23" \ + ); \ + _ret; \ +}) + +#define __nolibc_syscall4(num, arg1, arg2, arg3, arg4) = \ +({ = \ + register long _ret __asm__ ("r28"); \ + register long _arg1 __asm__ ("r26") =3D (long)(arg1); \ + register long _arg2 __asm__ ("r25") =3D (long)(arg2); \ + register long _arg3 __asm__ ("r24") =3D (long)(arg3); \ + register long _arg4 __asm__ ("r23") =3D (long)(arg4); \ + \ + __asm__ volatile ( \ + "ble 0x100(%%sr2, %%r0)\n\t" \ + "copy %5, %%r20\n\t" \ + : "=3Dr"(_ret), \ + "+r"(_arg1), "+r"(_arg2), "+r"(_arg3), "+r"(_arg4) \ + : "r"(num) \ + : _NOLIBC_SYSCALL_CLOBBERLIST, \ + "%r21", "%r22" \ + ); \ + _ret; \ +}) + +#define __nolibc_syscall5(num, arg1, arg2, arg3, arg4, arg5) = \ +({ = \ + register long _ret __asm__ ("r28"); \ + register long _arg1 __asm__ ("r26") =3D (long)(arg1); \ + register long _arg2 __asm__ ("r25") =3D (long)(arg2); \ + register long _arg3 __asm__ ("r24") =3D (long)(arg3); \ + register long _arg4 __asm__ ("r23") =3D (long)(arg4); \ + register long _arg5 __asm__ ("r22") =3D (long)(arg5); \ + \ + __asm__ volatile ( \ + "ble 0x100(%%sr2, %%r0)\n\t" \ + "copy %6, %%r20\n\t" \ + : "=3Dr"(_ret), \ + "+r"(_arg1), "+r"(_arg2), "+r"(_arg3), "+r"(_arg4), \ + "+r"(_arg5) \ + : "r"(num) \ + : _NOLIBC_SYSCALL_CLOBBERLIST, \ + "%r21" \ + ); \ + _ret; \ +}) + +#define __nolibc_syscall6(num, arg1, arg2, arg3, arg4, arg5, arg6) = \ +({ = \ + register long _ret __asm__ ("r28"); \ + register long _arg1 __asm__ ("r26") =3D (long)(arg1); \ + register long _arg2 __asm__ ("r25") =3D (long)(arg2); \ + register long _arg3 __asm__ ("r24") =3D (long)(arg3); \ + register long _arg4 __asm__ ("r23") =3D (long)(arg4); \ + register long _arg5 __asm__ ("r22") =3D (long)(arg5); \ + register long _arg6 __asm__ ("r21") =3D (long)(arg6); \ + \ + __asm__ volatile ( \ + "ble 0x100(%%sr2, %%r0)\n\t" \ + "copy %7, %%r20\n\t" \ + : "=3Dr"(_ret), \ + "+r"(_arg1), "+r"(_arg2), "+r"(_arg3), "+r"(_arg4), \ + "+r"(_arg5), "+r"(_arg6) \ + : "r"(num) \ + : _NOLIBC_SYSCALL_CLOBBERLIST \ + ); \ + _ret; \ +}) + +#ifndef NOLIBC_NO_RUNTIME +/* startup code */ +void __attribute__((weak, noreturn)) __nolibc_entrypoint __nolibc_no_stack= _protector _start(void) +{ + __asm__ volatile ( + ".import $global$\n" /* Set up the dp register */ + "ldil L%$global$, %dp\n" + "ldo R%$global$(%r27), %dp\n" + + "b _start_c\n" /* Call _start_c, the load below is execu= ted first */ + + "ldo -4(%r24), %r26\n" /* The sp register is special on parisc. + * r24 points to argv. Subtract 4 to get &argc. + * Pass that as first argument to _start_c. + */ + ); + __nolibc_entrypoint_epilogue(); +} +#endif /* NOLIBC_NO_RUNTIME */ + +#endif /* _NOLIBC_ARCH_PARISC_H */ diff --git a/tools/include/nolibc/arch.h b/tools/include/nolibc/arch.h index a3adaf433f2c..6dc45a78e972 100644 --- a/tools/include/nolibc/arch.h +++ b/tools/include/nolibc/arch.h @@ -28,6 +28,8 @@ #include "arch-m68k.h" #elif defined(__sh__) #include "arch-sh.h" +#elif defined(__hppa__) +#include "arch-parisc.h" #else #error Unsupported Architecture #endif diff --git a/tools/testing/selftests/nolibc/Makefile.nolibc b/tools/testing= /selftests/nolibc/Makefile.nolibc index f30bc68470cc..39816cbe782d 100644 --- a/tools/testing/selftests/nolibc/Makefile.nolibc +++ b/tools/testing/selftests/nolibc/Makefile.nolibc @@ -64,6 +64,7 @@ ARCH_s390x =3D s390 ARCH_sparc32 =3D sparc ARCH_sparc64 =3D sparc ARCH_sh4 =3D sh +ARCH_parisc32 =3D parisc ARCH :=3D $(or $(ARCH_$(XARCH)),$(XARCH)) =20 # kernel image names by architecture @@ -92,6 +93,7 @@ IMAGE_sparc32 =3D arch/sparc/boot/image IMAGE_sparc64 =3D arch/sparc/boot/image IMAGE_m68k =3D vmlinux IMAGE_sh4 =3D arch/sh/boot/zImage +IMAGE_parisc32 =3D vmlinux IMAGE =3D $(objtree)/$(IMAGE_$(XARCH)) IMAGE_NAME =3D $(notdir $(IMAGE)) =20 @@ -121,6 +123,7 @@ DEFCONFIG_sparc32 =3D sparc32_defconfig DEFCONFIG_sparc64 =3D sparc64_defconfig DEFCONFIG_m68k =3D virt_defconfig DEFCONFIG_sh4 =3D rts7751r2dplus_defconfig +DEFCONFIG_parisc32 =3D defconfig DEFCONFIG =3D $(DEFCONFIG_$(XARCH)) =20 EXTRACONFIG_x32 =3D -e CONFIG_X86_X32_ABI @@ -159,6 +162,7 @@ QEMU_ARCH_sparc32 =3D sparc QEMU_ARCH_sparc64 =3D sparc64 QEMU_ARCH_m68k =3D m68k QEMU_ARCH_sh4 =3D sh4 +QEMU_ARCH_parisc32 =3D hppa QEMU_ARCH =3D $(QEMU_ARCH_$(XARCH)) =20 QEMU_ARCH_USER_ppc64le =3D ppc64le @@ -199,6 +203,7 @@ QEMU_ARGS_sparc32 =3D -M SS-5 -m 256M -append "conso= le=3DttyS0,115200 panic=3D-1 $( QEMU_ARGS_sparc64 =3D -M sun4u -append "console=3DttyS0,115200 panic=3D= -1 $(TEST:%=3DNOLIBC_TEST=3D%)" QEMU_ARGS_m68k =3D -M virt -append "console=3DttyGF0,115200 panic=3D= -1 $(TEST:%=3DNOLIBC_TEST=3D%)" QEMU_ARGS_sh4 =3D -M r2d -serial file:/dev/stdout -append "console= =3DttySC1,115200 panic=3D-1 $(TEST:%=3DNOLIBC_TEST=3D%)" +QEMU_ARGS_parisc32 =3D -M B160L -append "console=3DttyS0 panic=3D-1 $(TE= ST:%=3DNOLIBC_TEST=3D%)" QEMU_ARGS =3D -m 1G $(QEMU_ARGS_$(XARCH)) $(QEMU_ARGS_BIOS) $(Q= EMU_ARGS_EXTRA) =20 # OUTPUT is only set when run from the main makefile, otherwise @@ -215,6 +220,7 @@ CFLAGS_i386 =3D $(call cc-option,-m32) CFLAGS_x32 =3D -mx32 CFLAGS_arm =3D -marm CFLAGS_armthumb =3D -mthumb -march=3Darmv6t2 +CFLAGS_parisc32 =3D -mfast-indirect-calls CFLAGS_ppc =3D -m32 -mbig-endian -mno-vsx $(call cc-option,-mmultiple) CFLAGS_ppc64 =3D -m64 -mbig-endian -mno-vsx $(call cc-option,-mmultiple) CFLAGS_ppc64le =3D -m64 -mlittle-endian -mno-vsx $(call cc-option,-mabi=3D= elfv2) diff --git a/tools/testing/selftests/nolibc/run-tests.sh b/tools/testing/se= lftests/nolibc/run-tests.sh index cd439096fdf3..fba6ca1b17b2 100755 --- a/tools/testing/selftests/nolibc/run-tests.sh +++ b/tools/testing/selftests/nolibc/run-tests.sh @@ -28,6 +28,7 @@ all_archs=3D( sparc32 sparc64 m68k sh4 + parisc32 ) archs=3D"${all_archs[@]}" =20 @@ -116,6 +117,7 @@ crosstool_arch() { s390*) echo s390;; sparc*) echo sparc64;; x32*) echo x86_64;; + parisc32) echo hppa;; *) echo "$1";; esac } @@ -173,6 +175,10 @@ test_arch() { fi MAKE=3D(make -f Makefile.nolibc -j"${nproc}" XARCH=3D"${arch}" CROSS_COMP= ILE=3D"${cross_compile}" LLVM=3D"${llvm}" O=3D"${build_dir}") =20 + if [ "$arch" =3D "parisc32" ]; then + MAKE+=3D("CROSS32CC=3D${cross_compile}gcc") + fi + case "$test_mode" in 'system') test_target=3Drun @@ -185,7 +191,7 @@ test_arch() { exit 1 esac printf '%-15s' "$arch:" - if [ "$arch" =3D "m68k" -o "$arch" =3D "sh4" ] && [ "$llvm" =3D "1" ]; th= en + if [ "$arch" =3D "m68k" -o "$arch" =3D "sh4" -o "$arch" =3D "parisc32" ] = && [ "$llvm" =3D "1" ]; then echo "Unsupported configuration" return fi --=20 2.54.0