From nobody Mon Jun 15 09:44:42 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 3E4513C3436; Thu, 9 Apr 2026 11:55:31 +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=1775735733; cv=none; b=qBP5yJSuilkn7AWwl+pyKlKpPYUfvZloNobn7GyzB21wM7BWbKhpMFSBOuNq1/RwPiRDFCMgBEO5HvNv9unxon3F9UEHGij1kQTbWCaiLD1EynifxXAfdRxIO9DNFD1f107ihNrTkUgobVi+1Z8KZ5ajj41dvF6yRPKM3LS7fes= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775735733; c=relaxed/simple; bh=Yfc5QKR8flQStWiZaylgCaabEIAAzzgZUAWfYl+Co6A=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=DFNqUt8vO58Uwrn0X6Cm8PItX7qGIBozvxqfnrA5e7TJszEcVwb2xqrGxdd4l47CKOvjPuGozko0tSncG5blK8y1p+PBCsYm+xs8Qx9do1npuF9HFXYuE7lC43Trhk/T2fD3pY2jqbWJefntihgVvxt6UFzJTnCj4caqWo3XirI= 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=gvwrr+s8; 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="gvwrr+s8" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1775735729; bh=Yfc5QKR8flQStWiZaylgCaabEIAAzzgZUAWfYl+Co6A=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=gvwrr+s8FAqCBabz0ASjBGDNvhMOf/DInlwN2ad37IMZzpn2nusK6Mq68/FPenMy/ 4oGHSxxWaDnzP7RtPEUJEBT/IsrK+svR8MfpttEqiqrN/f8iPpxX1m6QOu3ZWiMM3s GpKZeDVa7wSnXSBQt36vxdmGCRL2utYwCCuWID/o= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Thu, 09 Apr 2026 13:54:30 +0200 Subject: [PATCH v4 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: <20260409-nolibc-hppa-v4-1-24e5f31a0233@weissschuh.net> References: <20260409-nolibc-hppa-v4-0-24e5f31a0233@weissschuh.net> In-Reply-To: <20260409-nolibc-hppa-v4-0-24e5f31a0233@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=1775735729; l=1867; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=Yfc5QKR8flQStWiZaylgCaabEIAAzzgZUAWfYl+Co6A=; b=IDlP9sLJwhxf6GQrxpgiv1PmLbWRwbfc7VOqXPZs/59CL+tydfKSYYC/39Z/u1YVahtAjFe27 CKUJh0iT1crDsdu7auv2Be0Hx1H9q7JWn8kSvA7QT+5oUSNOJAiz/YK 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 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 09:44:42 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 3632B3C3442; Thu, 9 Apr 2026 11:55:32 +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=1775735734; cv=none; b=Fiogt6nq9ygMW7c8qSFafGqHut48/gV5dJL4bI82r4F064fJ2IuyI+A6QCPr1Vg7mXIIlrb22vLAjWU8e6NvNfFW85E2w/2n3sbmfpsdhr4ShPgrJdG8i+rOAEkofRRD+G0ngAuMd5oezY1vUMKh9Y4t/Lu7QoNnikMtm96lmts= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775735734; c=relaxed/simple; bh=GMerjpEn7CfH4kZ+kiHoTIMgVyc4+PNLFUleyZnwfdI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=B+8MJoq5ckatXJjgBa9g7jcdQqvV+VrkimvADSaI6CdJrwzhRwhcHSdePItGINnEcWoH4eVA7X+pnPHB9q5qg7D+0joJkTIpOFS4ObYt2zHpFhrc9+Hum0DFIiTkkPlKbfchXVCWaKB6u9YQRu1DcmaReix510PgHvuYsl3LqdE= 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=JlpkheDb; 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="JlpkheDb" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1775735729; bh=GMerjpEn7CfH4kZ+kiHoTIMgVyc4+PNLFUleyZnwfdI=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=JlpkheDbzZBYAFuNkdDLAr+8gV22V34wyOD59K/UHF82lASBnRQwetm9yHGW4t2eK sY+Ae0JXJdDo+QCTTRV1T4ru8sodumzkHMSEYhKavz5KxFqYgiyPkGL5hY9QXfMm54 TNcq1bahG3bbM5vZtpI7NJICXudcygLNiCpHtqLM= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Thu, 09 Apr 2026 13:54:31 +0200 Subject: [PATCH v4 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: <20260409-nolibc-hppa-v4-2-24e5f31a0233@weissschuh.net> References: <20260409-nolibc-hppa-v4-0-24e5f31a0233@weissschuh.net> In-Reply-To: <20260409-nolibc-hppa-v4-0-24e5f31a0233@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=1775735729; l=14781; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=GMerjpEn7CfH4kZ+kiHoTIMgVyc4+PNLFUleyZnwfdI=; b=nIzPoRHM2wDkQ6h0yiqH83CQd3xsXnVK9TorSGYdgGHXTg9Z2tqZj9ZvJ+8FIhAXLG9u13iLU 3Lyro2lGN4mCSVUUUe8EIyc3Y3Jm7XQ8VKdW2ok/vRharXbK7a1mVhM 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 | 179 +++++++++++++++++++++= ++++ tools/include/nolibc/arch.h | 2 + tools/testing/selftests/nolibc/Makefile.nolibc | 6 + tools/testing/selftests/nolibc/run-tests.sh | 8 +- 5 files changed, 195 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..4f1f091c5d27 --- /dev/null +++ b/tools/include/nolibc/arch-parisc.h @@ -0,0 +1,179 @@ +/* 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" \ + "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" + + "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 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