From nobody Mon Jun 15 07:38:16 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 538F53822BA; Wed, 8 Apr 2026 20:05:34 +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=1775678736; cv=none; b=lg64wZ1kxqUcCXmC71kdkylVnl0erTPayxYs9QB7wdIj5HpFiA7WP8eIvGd0g2v0DyNtYWB9e+JTjPC8mRHFs6m2nrMgFiH++RpzrT3ppzZB6u8NndrDnoLQmEyRs7NfVkiQ52nXBEo7dmawfWzWV+RWF0+4iFjkcalCSg5gI24= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775678736; c=relaxed/simple; bh=Yfc5QKR8flQStWiZaylgCaabEIAAzzgZUAWfYl+Co6A=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=qGIBNJC+K0iIvhW9Wpo6wxZbo8wXvcFoVTMyBbXEq5FwiY7wThlSF88fKs4lPz6wGt+7Zs5zuBhFk6AGmQfRF4t6X+Q1NPaex1aaipEFVGFkoHAT+bR3rp5wy0+bIy9+vtXTmSh3oftNIEmmoEiYtUpAVIo0SVetwcF+9qGXjAw= 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=padU8dEe; 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="padU8dEe" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1775678731; bh=Yfc5QKR8flQStWiZaylgCaabEIAAzzgZUAWfYl+Co6A=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=padU8dEeIpTlAAlWMoU7ZdAZaB4DHNeiztnUa1aDfwxLuzqzX3GLgCNM6T7ZH25PK lpYUOkKrwFk/VLWGLXr3QHpqzgiX7yKbk2bjqd/EmFbKy+UqOkxt1mp81XnkpFhSr2 ISU4G6GCP7ZFeKf54MX5KNtW0mnPLnBtuxxHkj3o= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Wed, 08 Apr 2026 22:05:28 +0200 Subject: [PATCH v3 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: <20260408-nolibc-hppa-v3-1-961f3754b506@weissschuh.net> References: <20260408-nolibc-hppa-v3-0-961f3754b506@weissschuh.net> In-Reply-To: <20260408-nolibc-hppa-v3-0-961f3754b506@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.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1775678731; l=1867; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=Yfc5QKR8flQStWiZaylgCaabEIAAzzgZUAWfYl+Co6A=; b=1/JOP5Weg6OZ0dd8AkDOVAGWLP7stTcleCJzPwksElohWeFj8dpT8Hwi8JJYx9B9Yt52jHY4e t/c0BLq9wQpDUXeGxCkaloAE20BAPN/u/+EqUV2QGWSWugSWoWGwOxE 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 --- 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 d3c4facb54c0..de4e87586d75 100644 --- a/tools/testing/selftests/nolibc/nolibc-test.c +++ b/tools/testing/selftests/nolibc/nolibc-test.c @@ -647,20 +647,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.53.0 From nobody Mon Jun 15 07:38:16 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 E42F237F8AC; Wed, 8 Apr 2026 20:05:33 +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=1775678735; cv=none; b=FA1IZ38ApbeUHs2nEZq492LmswD0jKbhq3S3LlNi9tDJWQULUmX7WndsOw2d9sgOdkJ3hs3QifuTEahYjR2Flvr0KWOEPF0x2evKUDngPrJg2/RqLQknevmNiNFsjVv15D0c3rRzrvSz/fKzW7IbaUPARhHVYxeA0mkztmPypU8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775678735; c=relaxed/simple; bh=l8guy6WauoXNFhR3wtwd1Fr+VJPbfTzhbHh2QjpYa/g=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=JLWwhvHvc5Nm/fW3BIYcQukN9Wyha3GCH1zK7/AzbM9F3P9gz6Fa2H6eI9912i9rDQLeMORNWDGVXV8rYEfB7dWMMccm1UqHJmkZqO5o53WbEIM2uE0VwMdezKY50w0R6R7DK0WzJ6gx4m5vVImka5LwMNUxhzAnCRr7ZswcdOQ= 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=CnZFZNvD; 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="CnZFZNvD" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1775678732; bh=l8guy6WauoXNFhR3wtwd1Fr+VJPbfTzhbHh2QjpYa/g=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=CnZFZNvDVH8x3S/s9KiK/dt5oPGeqQzciZGIPvbrWiCUDMu+uBeBE7p9njLdH3tr/ 4VMaThg+lWgEHFxPXYtkEbnNGTemuwtVOu7Tp5NWYXnjz0dE7mTIgEEwA2oNeCOMdc Mo/qXLRIQ52oRt0kuiMrQi2lgoQnefO+Ue7j/IDg= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Wed, 08 Apr 2026 22:05:29 +0200 Subject: [PATCH v3 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: <20260408-nolibc-hppa-v3-2-961f3754b506@weissschuh.net> References: <20260408-nolibc-hppa-v3-0-961f3754b506@weissschuh.net> In-Reply-To: <20260408-nolibc-hppa-v3-0-961f3754b506@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.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1775678731; l=14629; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=l8guy6WauoXNFhR3wtwd1Fr+VJPbfTzhbHh2QjpYa/g=; b=pXgLUTvs4f1zcVkeH+E4mlcZWULH0t7cRT9ivC2ue0A0powOlJEdRce0aUwffPSoS48yFvNpl zBS6TLwqoSdDpvJ8eO41QsOf8cyf34EXWAapyOzTdzwi6wDtqB0FkVz 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 --- tools/include/nolibc/Makefile | 2 +- tools/include/nolibc/arch-parisc.h | 178 +++++++++++++++++++++= ++++ tools/include/nolibc/arch.h | 2 + tools/testing/selftests/nolibc/Makefile.nolibc | 6 + tools/testing/selftests/nolibc/run-tests.sh | 8 +- 5 files changed, 194 insertions(+), 2 deletions(-) diff --git a/tools/include/nolibc/Makefile b/tools/include/nolibc/Makefile index 7455097cff69..81187126bf93 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 \ byteswap.h \ diff --git a/tools/include/nolibc/arch-parisc.h b/tools/include/nolibc/arch= -parisc.h new file mode 100644 index 000000000000..8580be5c9c58 --- /dev/null +++ b/tools/include/nolibc/arch-parisc.h @@ -0,0 +1,178 @@ +/* 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 executed first, use it to load the nu= mber + * - 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" \ + "ldi %1, %%r20\n\t" \ + : "=3Dr"(_ret) \ + : "i"(num) \ + : _NOLIBC_SYSCALL_CLOBBERLIST \ + ); \ + _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" \ + "ldi %2, %%r20\n\t" \ + : "=3Dr"(_ret), \ + "+r"(_arg1) \ + : "i"(num) \ + : _NOLIBC_SYSCALL_CLOBBERLIST \ + ); \ + _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" \ + "ldi %3, %%r20\n\t" \ + : "=3Dr"(_ret), \ + "+r"(_arg1), "+r"(_arg2) \ + : "i"(num) \ + : _NOLIBC_SYSCALL_CLOBBERLIST \ + ); \ + _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" \ + "ldi %4, %%r20\n\t" \ + : "=3Dr"(_ret), \ + "+r"(_arg1), "+r"(_arg2), "+r"(_arg3) \ + : "i"(num) \ + : _NOLIBC_SYSCALL_CLOBBERLIST \ + ); \ + _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" \ + "ldi %5, %%r20\n\t" \ + : "=3Dr"(_ret), \ + "+r"(_arg1), "+r"(_arg2), "+r"(_arg3), "+r"(_arg4) \ + : "i"(num) \ + : _NOLIBC_SYSCALL_CLOBBERLIST \ + ); \ + _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" \ + "ldi %6, %%r20\n\t" \ + : "=3Dr"(_ret), \ + "+r"(_arg1), "+r"(_arg2), "+r"(_arg3), "+r"(_arg4), \ + "+r"(_arg5) \ + : "i"(num) \ + : _NOLIBC_SYSCALL_CLOBBERLIST \ + ); \ + _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" \ + "ldi %7, %%r20\n\t" \ + : "=3Dr"(_ret), \ + "+r"(_arg1), "+r"(_arg2), "+r"(_arg3), "+r"(_arg4), \ + "+r"(_arg5), "+r"(_arg6) \ + : "i"(num) \ + : _NOLIBC_SYSCALL_CLOBBERLIST \ + ); \ + _ret; \ +}) + +#ifndef NOLIBC_NO_RUNTIME +/* startup code */ +void __attribute__((weak, noreturn)) __nolibc_entrypoint __no_stack_protec= tor _start(void) +{ + __asm__ volatile ( + ".import $global$\n" /* Set up the dp register */ + "ldil L%$global$, %dp\n" + "ldo R%$global$(%r27), %dp\n" + + "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. + */ + + "b,n _start_c\n" + ); + __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..e9494f3cbc03 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 -append "console=3DttyS0 panic=3D-1 $(TEST:%=3DNO= LIBC_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 3917cfb8fdc4..e64f95e8f984 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.53.0