From patchwork Wed Sep 4 10:50:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Jones X-Patchwork-Id: 1980656 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=X1Z4+MsB; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=fZ0sTCwl; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WzK5j5Xvfz1yXY for ; Wed, 4 Sep 2024 20:50:33 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=LeTDag8rLynP+qzTDLTkqwB6ji3BjhY5Q2pWdxd+A4g=; b=X1Z4+MsBEZRBZd pn5g7y0RgEcAQjKmDEGtLKbF6w96brccTeZlD9FKja51KHCt6omVbxus7Plqm8RN6ea5AUDw93Z/i MWElGL9vAPG8TBNh2CUjmH2KZMM57pIGOHAO3mqbgbyHDp1ucBddZu3btttUHh8mTmqIN4DXu7U/u 71kOWAvYSqah/MGhCAdllqRM/zu8XLhse3lNX1X3CbBPyR/pa6Adj+ik3PUxg4kTNp9Qi7KwbXD3h adpEdxM/m3ihjF/k3FdFC3I+fwjMU0Cxk6HKglz497vBxYjbcsmJ2AZDcmvw6cPml/E4+XGRxJFzy L3wCOpICx3Igaaejn6ew==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1slnaq-00000003zjt-2GKo; Wed, 04 Sep 2024 10:50:32 +0000 Received: from out-188.mta1.migadu.com ([95.215.58.188]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1slnam-00000003zi2-3fFg for kvm-riscv@lists.infradead.org; Wed, 04 Sep 2024 10:50:30 +0000 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1725447026; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=P8NNLQYH8P4X4ClL5Bx8RReyaTo01W2Due3h6Q3oXYc=; b=fZ0sTCwlLwmNS4Qx14Caj3m7+Wf9GvHpK45FyYLnYSoeN3sTNUc9ZNhvJFFXKjE2qIit3w xrRRlddFhToMEzSHA9L71dLm3+ol7hxzwVSZI5woh4aBt6SMFmmXNpDbpi/I3M9lEtpG9g qWnZMd/+09bOVCE2Sd/kwb0IjKBB0FY= From: Andrew Jones To: kvm@vger.kernel.org, kvm-riscv@lists.infradead.org, kvmarm@lists.linux.dev, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org Cc: pbonzini@redhat.com, thuth@redhat.com, lvivier@redhat.com, frankja@linux.ibm.com, imbrenda@linux.ibm.com, nrb@linux.ibm.com, atishp@rivosinc.com, cade.richard@berkeley.edu, jamestiotio@gmail.com Subject: [kvm-unit-tests PATCH v2 1/4] riscv: Drop mstrict-align Date: Wed, 4 Sep 2024 12:50:22 +0200 Message-ID: <20240904105020.1179006-7-andrew.jones@linux.dev> In-Reply-To: <20240904105020.1179006-6-andrew.jones@linux.dev> References: <20240904105020.1179006-6-andrew.jones@linux.dev> MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240904_035029_228604_287C7DAE X-CRM114-Status: UNSURE ( 8.05 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.8 (--) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: The spec says unaligned accesses are supported, so this isn't required and clang doesn't support it. A platform might have slow unaligned accesses, but kvm-unit-tests isn't about speed anyway. Reviewed-by: Thomas Huth Signed-off-by: Andrew Jones --- riscv/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Content analysis details: (-2.8 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [95.215.58.188 listed in list.dnswl.org] 0.0 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [95.215.58.188 listed in sa-trusted.bondedsender.org] 0.0 RCVD_IN_VALIDITY_SAFE_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [95.215.58.188 listed in sa-accredit.habeas.com] -0.0 T_SCC_BODY_TEXT_LINE No description available. 0.0 RCVD_IN_VALIDITY_RPBL_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [95.215.58.188 listed in bl.score.senderscore.com] X-BeenThere: kvm-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "kvm-riscv" Errors-To: kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org The spec says unaligned accesses are supported, so this isn't required and clang doesn't support it. A platform might have slow unaligned accesses, but kvm-unit-tests isn't about speed anyway. Reviewed-by: Thomas Huth Signed-off-by: Andrew Jones --- riscv/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/riscv/Makefile b/riscv/Makefile index 179a373dbacf..2ee7c5bb5ad8 100644 --- a/riscv/Makefile +++ b/riscv/Makefile @@ -76,7 +76,7 @@ LDFLAGS += -melf32lriscv endif CFLAGS += -DCONFIG_RELOC CFLAGS += -mcmodel=medany -CFLAGS += -mstrict-align +#CFLAGS += -mstrict-align CFLAGS += -std=gnu99 CFLAGS += -ffreestanding CFLAGS += -O2 From patchwork Wed Sep 4 10:50:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Jones X-Patchwork-Id: 1980657 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=jb/jM/w0; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=HHF2H9yX; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WzK5l0h2Hz1yXY for ; Wed, 4 Sep 2024 20:50:35 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=BRWlE/B7woXDnAoFXrjDWLPn4kRokQI8GY3sub5kS94=; b=jb/jM/w0HhDbdJ EH0kbqy7Wgj5rL76vpDhGhcRlodXdNiBql0yUlELECHQKvHXFMPCNAoxg0arr3WxfZjZcUseJ3rqL 5rl9LNJN00CP8YByUX9OzImBgo0eI6/N6mEGj9U3tsPxY8byoAB+ScGyfJFY8Wz7sfFui/Sesu0GJ OH7wZ4RvtG/TeGhB9RZwqmON0h9NUhUQC7xZdJ376HhFyhTCvxKJl7xa/vHx9nPBs7KU48Yl8xHzP otlYGgIbnFa8d7qhVx3ZUwwHPhSpCq0HAUuqEKrad4/Te+f+meDXyc3VXKJPjTOmjodIs4kPqEjW/ vQE+5E0sKt+1KKdmqclA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1slnar-00000003zkR-3jrd; Wed, 04 Sep 2024 10:50:33 +0000 Received: from out-185.mta1.migadu.com ([2001:41d0:203:375::b9]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1slnap-00000003zip-1HLF for kvm-riscv@lists.infradead.org; Wed, 04 Sep 2024 10:50:32 +0000 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1725447029; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1Myu9U8IEbrxLCMMi6SGb7S+yIVucaaKwRIVAbRfcI4=; b=HHF2H9yXkjxJiYAPY3icEMi+j2QRE1ZCsM+RJp4sNwAXeNrVZM2TGzSxwZ0eOKf2tcQ5/d zRSsTShl3LGbta5Efi5TVD3aVX7fEV3W1Xz91D8WaM+UnLqEqQ+0eVVTLG93W3QyOHFggR VkeMJay9znbhrKvHgqJQFKS5p/aE14I= From: Andrew Jones To: kvm@vger.kernel.org, kvm-riscv@lists.infradead.org, kvmarm@lists.linux.dev, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org Cc: pbonzini@redhat.com, thuth@redhat.com, lvivier@redhat.com, frankja@linux.ibm.com, imbrenda@linux.ibm.com, nrb@linux.ibm.com, atishp@rivosinc.com, cade.richard@berkeley.edu, jamestiotio@gmail.com Subject: [kvm-unit-tests PATCH v2 2/4] Makefile: Prepare for clang EFI builds Date: Wed, 4 Sep 2024 12:50:23 +0200 Message-ID: <20240904105020.1179006-8-andrew.jones@linux.dev> In-Reply-To: <20240904105020.1179006-6-andrew.jones@linux.dev> References: <20240904105020.1179006-6-andrew.jones@linux.dev> MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240904_035031_501566_BCD1A5CE X-CRM114-Status: UNSURE ( 7.28 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.1 (--) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: clang complains about GNU extensions such as variable sized types not being at the end of structs unless -Wno-gnu is used. We may eventually want -Wno-gnu, but for now let's just handle the warnings a [...] Content analysis details: (-2.1 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.0 T_SCC_BODY_TEXT_LINE No description available. X-BeenThere: kvm-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "kvm-riscv" Errors-To: kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org clang complains about GNU extensions such as variable sized types not being at the end of structs unless -Wno-gnu is used. We may eventually want -Wno-gnu, but for now let's just handle the warnings as they come. Add -Wno-gnu-variable-sized-type-not-at-end to avoid the warning issued for the initrd_dev_path struct. Signed-off-by: Andrew Jones Reviewed-by: Thomas Huth Reviewed-by: Nicholas Piggin --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index 3d51cb726120..7471f7285b78 100644 --- a/Makefile +++ b/Makefile @@ -50,6 +50,8 @@ EFI_CFLAGS += -fshort-wchar # EFI applications use PIC as they are loaded to dynamic addresses, not a fixed # starting address EFI_CFLAGS += -fPIC +# Avoid error with the initrd_dev_path struct +EFI_CFLAGS += -Wno-gnu-variable-sized-type-not-at-end # Create shared library EFI_LDFLAGS := -Bsymbolic -shared -nostdlib endif From patchwork Wed Sep 4 10:50:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Jones X-Patchwork-Id: 1980659 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=MPU6W1bw; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=DfwOsMng; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WzK5q47cyz1yXY for ; Wed, 4 Sep 2024 20:50:39 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=e8U3HKmRGn8yPJ2zI2EglVrKq4NyBZn5Yl8ALRaaqgI=; b=MPU6W1bwddzuul v9tpoUCvlf5pMNtY0BRy3sRrp8EQfPz/iJjXqgx2HIWNWLftaLKxh9ZXBH4P7duqa3lvkDRlHNJtS 2lQGfglcCPYlQJfKejRLsCQEGPFAPC0sxAI03IE01r8CKrpHVy0RmQq2bJ5N7LSFfTsGB81KWjtxY Hdgzt/bVyd3is/QAwTN+F+6bacr/hkrY6SPvN7c0Zsch4o4lHLFun865sGv+x5z7/CLRAzUcOwE3D 01bSe6+IxKm9igq/ZNxunW596kaX7m0lVG3EdDGSjVsX8bHNLXArqedfgV6azwAlV0dKSRYhDx3iN L6SEKqszXxwfR5GztVoA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1slnaw-00000003zmt-1TqH; Wed, 04 Sep 2024 10:50:38 +0000 Received: from out-175.mta0.migadu.com ([91.218.175.175]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1slnat-00000003zkQ-1N18 for kvm-riscv@lists.infradead.org; Wed, 04 Sep 2024 10:50:37 +0000 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1725447033; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kNTcbcoGqC40B7+iBoWPEf68cZWl3EVbLygndY9kHOM=; b=DfwOsMngKluH7GcwpljWLkvl87ksYQ8YxID4gdUeq1JHuXHhquhhB8ZkS0lyS0SDeJM5r5 Kx4zUoP/Mfrs3I0ob+gaRCdkORb+wS1zh0ygqm2KAu2Wp4xP89OKPsUT3u1SpsThTQeYqe H8Gh1/16xHhT8yEcunySMkEsqwIaYeA= From: Andrew Jones To: kvm@vger.kernel.org, kvm-riscv@lists.infradead.org, kvmarm@lists.linux.dev, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org Cc: pbonzini@redhat.com, thuth@redhat.com, lvivier@redhat.com, frankja@linux.ibm.com, imbrenda@linux.ibm.com, nrb@linux.ibm.com, atishp@rivosinc.com, cade.richard@berkeley.edu, jamestiotio@gmail.com Subject: [kvm-unit-tests PATCH v2 3/4] configure: Support cross compiling with clang Date: Wed, 4 Sep 2024 12:50:24 +0200 Message-ID: <20240904105020.1179006-9-andrew.jones@linux.dev> In-Reply-To: <20240904105020.1179006-6-andrew.jones@linux.dev> References: <20240904105020.1179006-6-andrew.jones@linux.dev> MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240904_035035_539308_9048CBD4 X-CRM114-Status: GOOD ( 10.97 ) X-Spam-Score: -2.1 (--) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: When a user specifies the compiler with --cc assume it's already fully named, even if the user also specifies a cross-prefix. This allows clang to be selected for the compiler, which doesn't use prefi [...] Content analysis details: (-2.1 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.0 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [91.218.175.175 listed in sa-trusted.bondedsender.org] 0.0 RCVD_IN_VALIDITY_SAFE_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [91.218.175.175 listed in sa-accredit.habeas.com] 0.0 RCVD_IN_VALIDITY_RPBL_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [91.218.175.175 listed in bl.score.senderscore.com] -0.0 T_SCC_BODY_TEXT_LINE No description available. X-BeenThere: kvm-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "kvm-riscv" Errors-To: kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org When a user specifies the compiler with --cc assume it's already fully named, even if the user also specifies a cross-prefix. This allows clang to be selected for the compiler, which doesn't use prefixes, but also still provide a cross prefix for binutils. If a user needs a prefix on the compiler that they specify with --cc, then they'll just have to specify it with the prefix prepended. Also ensure user provided cflags are used when testing the compiler, since the flags may drastically change behavior, such as the --target flag for clang. With these changes it's possible to cross compile for riscv with clang after configuring with ./configure --arch=riscv64 --cc=clang --cflags='--target=riscv64' \ --cross-prefix=riscv64-linux-gnu- Reviewed-by: Thomas Huth Signed-off-by: Andrew Jones Reviewed-by: Nicholas Piggin --- configure | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/configure b/configure index 27ae9cc89657..337af07374df 100755 --- a/configure +++ b/configure @@ -130,6 +130,7 @@ while [[ "$1" = -* ]]; do ;; --cc) cc="$arg" + cc_selected=yes ;; --cflags) cflags="$arg" @@ -200,6 +201,10 @@ while [[ "$1" = -* ]]; do esac done +if [ -z "$cc_selected" ] && [ "$cross_prefix" ]; then + cc="$cross_prefix$cc" +fi + if [ -z "$efi" ] || [ "$efi" = "n" ]; then [ "$efi_direct" = "y" ] && efi_direct= fi @@ -370,7 +375,7 @@ fi cat << EOF > lib-test.c __UINT32_TYPE__ EOF -u32_long=$("$cross_prefix$cc" -E lib-test.c | grep -v '^#' | grep -q long && echo yes) +u32_long=$("$cc" $cflags -E lib-test.c | grep -v '^#' | grep -q long && echo yes) rm -f lib-test.c # check if slash can be used for division @@ -379,7 +384,7 @@ if [ "$arch" = "i386" ] || [ "$arch" = "x86_64" ]; then foo: movl (8 / 2), %eax EOF - wa_divide=$("$cross_prefix$cc" -c lib-test.S >/dev/null 2>&1 || echo yes) + wa_divide=$("$cc" $cflags -c lib-test.S >/dev/null 2>&1 || echo yes) rm -f lib-test.{o,S} fi @@ -442,7 +447,7 @@ ARCH=$arch ARCH_NAME=$arch_name ARCH_LIBDIR=$arch_libdir PROCESSOR=$processor -CC=$cross_prefix$cc +CC=$cc CFLAGS=$cflags LD=$cross_prefix$ld OBJCOPY=$cross_prefix$objcopy From patchwork Wed Sep 4 10:50:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Jones X-Patchwork-Id: 1980660 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=n2cB3Peb; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=RO3kLNCP; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WzK5v1WlPz1yXY for ; Wed, 4 Sep 2024 20:50:43 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=nk6/kqLwJ5vgGKxqtfVVH1pnKQtd0B5A2dKKuQIXwZ4=; b=n2cB3PebW9HYRB SOzoCZ/GFZfMZiqD6pZ7KbWwAd/nCkcKp1ifAbLCZDCqbYTu6ObZ7K043ROzOUx83orZ06lwPhTsW IQGkZKbm6+ghEmA42lCbf7Tr0ecWBVgJIXJt0gN4okb0qz3OQ+FtweTes8Dpvkr1UKm3QUeVmHIjJ il+H5TcYgpdGojB/8+uFzijK4Ivqw+DWP58/zn2rvglkITmTidTCcetixH+XUug0+0o9gTIhpcfzq /P2i+Boc9cKJN30IIEtHvk/Mjby27AsHxaBQVfmDHIbpNNVObsmxCNrmHXXQlDDPQje21J35PhHNO fWmFKSOiugP7LocvRtpw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1slnaz-00000003zov-3fQ2; Wed, 04 Sep 2024 10:50:41 +0000 Received: from out-185.mta1.migadu.com ([2001:41d0:203:375::b9]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1slnav-00000003zm9-2wZg for kvm-riscv@lists.infradead.org; Wed, 04 Sep 2024 10:50:39 +0000 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1725447036; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZhPTZTrrRJVhwWNoNwQnkN0fKy36Z67lIvpYzPGyDVM=; b=RO3kLNCPH9ub5/C7TIsWdlvI31qRyVNSt88Ikuz/ZxkPKwBET31zOiiashgp8zi3AhWaEl 17PdyUyRD662k+LsmtrG7jc/xv/36HjDlilu6CsvG3YQK+QjjPqykxRz7pH3BeQN+Ipew2 Gxyg+v90vuXLsWzpqsaLfc7Etkccmpg= From: Andrew Jones To: kvm@vger.kernel.org, kvm-riscv@lists.infradead.org, kvmarm@lists.linux.dev, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org Cc: pbonzini@redhat.com, thuth@redhat.com, lvivier@redhat.com, frankja@linux.ibm.com, imbrenda@linux.ibm.com, nrb@linux.ibm.com, atishp@rivosinc.com, cade.richard@berkeley.edu, jamestiotio@gmail.com Subject: [kvm-unit-tests PATCH v2 4/4] riscv: gitlab-ci: Add clang build tests Date: Wed, 4 Sep 2024 12:50:25 +0200 Message-ID: <20240904105020.1179006-10-andrew.jones@linux.dev> In-Reply-To: <20240904105020.1179006-6-andrew.jones@linux.dev> References: <20240904105020.1179006-6-andrew.jones@linux.dev> MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240904_035037_957873_31139944 X-CRM114-Status: UNSURE ( 5.97 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.1 (--) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Test building 32 and 64-bit with clang. Throw a test of in- and out- of-tree building in too by swapping which is done to which (32-bit vs. 64-bit) with respect to the gcc build tests. Acked-by: Thomas Huth Signed-off-by: Andrew Jones --- .gitlab-ci.yml | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) Content analysis details: (-2.1 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.0 T_SCC_BODY_TEXT_LINE No description available. X-BeenThere: kvm-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "kvm-riscv" Errors-To: kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Test building 32 and 64-bit with clang. Throw a test of in- and out- of-tree building in too by swapping which is done to which (32-bit vs. 64-bit) with respect to the gcc build tests. Acked-by: Thomas Huth Signed-off-by: Andrew Jones Acked-by: Nicholas Piggin --- .gitlab-ci.yml | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 67a9a15733f1..b7ad99870e5a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -176,6 +176,49 @@ build-riscv64-efi: | tee results.txt - grep -q PASS results.txt && ! grep -q FAIL results.txt +build-riscv32-clang: + extends: .intree_template + script: + - dnf install -y qemu-system-riscv gcc-riscv64-linux-gnu clang + - ./configure --arch=riscv32 --cc=clang --cflags='--target=riscv32' --cross-prefix=riscv64-linux-gnu- + - make -j2 + - printf "FOO=foo\nBAR=bar\nBAZ=baz\nMVENDORID=0\nMARCHID=0\nMIMPID=0\n" >test-env + - ACCEL=tcg KVM_UNIT_TESTS_ENV=test-env ./run_tests.sh + selftest + sbi + | tee results.txt + - grep -q PASS results.txt && ! grep -q FAIL results.txt + +build-riscv64-clang: + extends: .outoftree_template + script: + - dnf install -y qemu-system-riscv gcc-riscv64-linux-gnu clang + - mkdir build + - cd build + - ../configure --arch=riscv64 --cc=clang --cflags='--target=riscv64' --cross-prefix=riscv64-linux-gnu- + - make -j2 + - printf "FOO=foo\nBAR=bar\nBAZ=baz\nMVENDORID=0\nMARCHID=0\nMIMPID=0\n" >test-env + - ACCEL=tcg KVM_UNIT_TESTS_ENV=test-env ./run_tests.sh + selftest + sbi + | tee results.txt + - grep -q PASS results.txt && ! grep -q FAIL results.txt + +build-riscv64-clang-efi: + extends: .intree_template + script: + - dnf install -y edk2-riscv64 qemu-system-riscv gcc-riscv64-linux-gnu clang + - cp /usr/share/edk2/riscv/RISCV_VIRT_CODE.fd . + - truncate -s 32M RISCV_VIRT_CODE.fd + - ./configure --arch=riscv64 --cc=clang --cflags='--target=riscv64' --cross-prefix=riscv64-linux-gnu- --enable-efi + - make -j2 + - printf "FOO=foo\nBAR=bar\nBAZ=baz\nMVENDORID=0\nMARCHID=0\nMIMPID=0\n" >test-env + - ACCEL=tcg KVM_UNIT_TESTS_ENV=test-env ./run_tests.sh + selftest + sbi + | tee results.txt + - grep -q PASS results.txt && ! grep -q FAIL results.txt + build-s390x: extends: .outoftree_template script: