From nobody Tue Dec 2 01:05:41 2025 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 9EE322FD1D7; Sat, 22 Nov 2025 11:02:02 +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=1763809325; cv=none; b=NBCSCGmI1xQJEOl3+dLn0NjLqgNUjdbC5h3KKFVA8XdgnD7R9rZmDPjTd+zSMoUkg8ft+tcTLtgG1zAIAEUaQDVLBz/DpqAgMYv4jQyjGcpDc8jsKr4e1XKpqToLQakRw+uU4U/IE+OSg0y/ykOUc535hFyQjyHg2hMzM4pqEec= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763809325; c=relaxed/simple; bh=eRyETfiY5LMBlFDPWd7Z0sQoYGIhmNfukTtsw1mD9nc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=uuCi0jffZbwqinbFsiWvlz40DCXkxPmTotcnuB4FM3bj3WgCdoDXSG8K70jwRVohAdMMgLvASjLsNdQHAFePp42ho4MCVF0eSYI0cr93D0oGgCJYo9VoXrmD3DNWl9NwMqAH2o4LilGX6sMXkXVrxlYoUtVfqKOy6wEU3BJfwco= 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=MQgF0KYS; 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="MQgF0KYS" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1763809320; bh=eRyETfiY5LMBlFDPWd7Z0sQoYGIhmNfukTtsw1mD9nc=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=MQgF0KYSgK/40PAqztF6LH/Hh6J+C6T2zTM7lXL38H0Vw6o9rQsZ7O8XfvcZn33bh brTXYAcxOsc3MQS2IBEej9q9TM+MV/7PRBMyrGiYKDWpnOe58D7Qun8OyhPCcxi35V eVMajM83SvZnmiISo5RpNCFaEHw85mo8WlOtWzjI= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Sat, 22 Nov 2025 12:01:57 +0100 Subject: [PATCH 1/2] selftests/nolibc: use lld to link loongarch binaries 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: <20251122-nolibc-lld-v1-1-5e181e228c6a@weissschuh.net> References: <20251122-nolibc-lld-v1-0-5e181e228c6a@weissschuh.net> In-Reply-To: <20251122-nolibc-lld-v1-0-5e181e228c6a@weissschuh.net> To: Willy Tarreau , Shuah Khan Cc: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1763809320; l=1213; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=eRyETfiY5LMBlFDPWd7Z0sQoYGIhmNfukTtsw1mD9nc=; b=UwD5v9+R4DiMlJYDpPF4knahqJETyKRW845PxWVPlRQ+0EF32+FcnFVIlSESsJADIAIo/R8Xz YXG6UT/nhwTDTNMpBLnRftdET8x7o4o//pT3ZVUxPT7Jyb00zWw5Hya X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= LLVM 21 switched to -mcmodel=3Dmedium for LoongArch64 compilations. This code model uses R_LARCH_ECALL36 relocations which might not be supported by GNU ld which to nolibc testsuite uses by default. ld will not resolve the relocation and all function calls will end up as busy loops. Use lld instead. We can not switch to lld for all LLVM builds, as it does not support all necessary architectures. Signed-off-by: Thomas Wei=C3=9Fschuh --- tools/testing/selftests/nolibc/Makefile.nolibc | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/selftests/nolibc/Makefile.nolibc b/tools/testing= /selftests/nolibc/Makefile.nolibc index 330e000baeb1..9423f4a959b2 100644 --- a/tools/testing/selftests/nolibc/Makefile.nolibc +++ b/tools/testing/selftests/nolibc/Makefile.nolibc @@ -230,6 +230,7 @@ CFLAGS_mipsn32le =3D -EL -mabi=3Dn32 -fPIC -march=3Dmip= s64r2 CFLAGS_mipsn32be =3D -EB -mabi=3Dn32 -march=3Dmips64r6 CFLAGS_mips64le =3D -EL -mabi=3D64 -march=3Dmips64r6 CFLAGS_mips64be =3D -EB -mabi=3D64 -march=3Dmips64r2 +CFLAGS_loongarch =3D $(if $(LLVM),-fuse-ld=3Dlld) CFLAGS_sparc32 =3D $(call cc-option,-m32) CFLAGS_sh4 =3D -ml -m4 ifeq ($(origin XARCH),command line) --=20 2.52.0 From nobody Tue Dec 2 01:05:41 2025 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 6A6D02FD1D9; Sat, 22 Nov 2025 11:02:03 +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=1763809325; cv=none; b=YXENxMqJWLNs0dWFesnPTWIty11NdQDPRmyqkjGWlCAdVUe1M3Fc4FETPhvZfoo32PYO//Pqf/nJRTqy4e1w6HPAIWRvMlS+mKA6CxhftmNC0PXovxa8anZ4FZkVdcaS6JsqAzxAP4UtmMDBf3WAwA2YWtbqhMAnlFqFbW4+iFU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763809325; c=relaxed/simple; bh=vBXafayDfLtVbeWuQ7B+H3LSwXhGNeqajXMnFisErIw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=enfL+wipHmiJcSsMv/RVQQ3exskQG7Dgs83zjKE4X7MUng1lNJNXBjWppZTJppqh2jOx5yIFxqhgSTSvwvKU7CmmNP9Hbxw8yY4/PZyXyqrx6RDe5pJIJpZhm/IFeR4ctUtJtho+F5mOB3I9GyIcvXufk4Te4nBbR7LIPSh0LpY= 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=SjNzTmsw; 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="SjNzTmsw" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1763809320; bh=vBXafayDfLtVbeWuQ7B+H3LSwXhGNeqajXMnFisErIw=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=SjNzTmswjdz3QkUD0He+Qc/i6vgroUPKaj5f0dKYpa+/UdEY1BdZ7lwsigWmkhUYP QqE8DsJfybDeDraf6/7MdprqJAQ3E7dLRugRYDxF/mBuMBnKgiATOO3Cj35VFsCWK8 rWuxti5STHwgm92A9vQh52akq9QBB2xlyVuC8+jE= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Sat, 22 Nov 2025 12:01:58 +0100 Subject: [PATCH 2/2] selftests/nolibc: error out on linker warnings 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: <20251122-nolibc-lld-v1-2-5e181e228c6a@weissschuh.net> References: <20251122-nolibc-lld-v1-0-5e181e228c6a@weissschuh.net> In-Reply-To: <20251122-nolibc-lld-v1-0-5e181e228c6a@weissschuh.net> To: Willy Tarreau , Shuah Khan Cc: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1763809320; l=1032; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=vBXafayDfLtVbeWuQ7B+H3LSwXhGNeqajXMnFisErIw=; b=jiqRxgHUrnDiwJmC4lHc9nET/O1Rq3EX+eq4dCYiKrbtokIa9Oeb++KYsvtr9s3UqbkmCGJf5 e8rzvWH4mdjD4GiMys4/rdyfV+1xAfRD2fIW/VG8wlQ2Z5ygyUtUql0 X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= If the linker emits warnings these should abort the build. Otherwise they will be swallowed by run-tests.sh and not shown. Signed-off-by: Thomas Wei=C3=9Fschuh --- tools/testing/selftests/nolibc/run-tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/nolibc/run-tests.sh b/tools/testing/se= lftests/nolibc/run-tests.sh index e8af1fb505cf..bbe8afbabd3a 100755 --- a/tools/testing/selftests/nolibc/run-tests.sh +++ b/tools/testing/selftests/nolibc/run-tests.sh @@ -169,7 +169,7 @@ test_arch() { cross_compile=3D$(realpath "${download_location}gcc-${crosstool_version}-= nolibc/${ct_arch}-${ct_abi}/bin/${ct_arch}-${ct_abi}-") build_dir=3D"${build_location}/${arch}" if [ "$werror" -ne 0 ]; then - CFLAGS_EXTRA=3D"$CFLAGS_EXTRA -Werror" + CFLAGS_EXTRA=3D"$CFLAGS_EXTRA -Werror -Wl,--fatal-warnings" 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 --=20 2.52.0