From patchwork Wed Sep 11 09:14:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Jones X-Patchwork-Id: 1983833 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=nZfItk+e; 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=ukkq+j7D; 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 4X3Zh36Q5kz1y21 for ; Wed, 11 Sep 2024 19:16: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=OKkvbRr/jaQ9AUfzIkUZ63vsL1eL9/8ne8mz2IlY1QI=; b=nZfItk+eESgq/B Ih1pQfQDidVoj02ZiLlhZ4VAeMLcBuHRjsq+s+timS7JabVySMDOb5H6MZcUT9C+nmvUUWYzubkky r/tQ4JomQImnfbhGCyP1ugUk7EMalevKt0y49pWvgOk8vRRHXeYoZDBCpyKVIwyi8YY2LoTl8gGpR I9KhQAgC5unNpN+Wfl2z6ik2PWFnF6f1xucPLkQjrA5EJG75uqKyhTrZdy1CNjVHlOomIx8FhL3Hu 4zP3UyMWj2fUQ7RzhK5pozqx2VTK8r2vQKvpWVU6rcEjiB2SgRcK/B8KN73GngL0fpQNmV3BAuhf7 FeqilXCBEW92nyBQBcsw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1soJSk-00000008sXF-2ROF; Wed, 11 Sep 2024 09:16:34 +0000 Received: from out-183.mta0.migadu.com ([91.218.175.183]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1soJQb-00000008rjK-01eT for kvm-riscv@lists.infradead.org; Wed, 11 Sep 2024 09:14:22 +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=1726046058; 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=PG2DAax+JlcWtQamyINUSDmt+za3swHNY4VA8lUVONc=; b=ukkq+j7DSgzu99+s4/Sj7crBGzDfShHZKTFs2u72WegAsbbYuORO7jgNfgze3vogvP3D6k 3vpzTR+AZ1TXwx5pqiziUb+WHgS55/sAqA3h9+fYA90AAidxkqm/fOe0VJ64UegmgY/FWJ +I4h4bD34o4s0knIOFV/gn/cq7bPnfs= 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 v3 1/5] riscv: Drop mstrict-align Date: Wed, 11 Sep 2024 11:14:08 +0200 Message-ID: <20240911091406.134240-8-andrew.jones@linux.dev> In-Reply-To: <20240911091406.134240-7-andrew.jones@linux.dev> References: <20240911091406.134240-7-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-20240911_021421_205192_F48BC7C0 X-CRM114-Status: UNSURE ( 7.42 ) 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: 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 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) Content analysis details: (-2.1 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 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.183 listed in sa-accredit.habeas.com] 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.183 listed in sa-trusted.bondedsender.org] 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.183 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 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/riscv/Makefile b/riscv/Makefile index 179a373dbacf..22fd273acac3 100644 --- a/riscv/Makefile +++ b/riscv/Makefile @@ -76,7 +76,9 @@ LDFLAGS += -melf32lriscv endif CFLAGS += -DCONFIG_RELOC CFLAGS += -mcmodel=medany -CFLAGS += -mstrict-align +# Unaligned accesses are allowed, but may be emulated by M-mode. +# Enable -mstrict-align if that's troublesome (only supported by gcc). +#CFLAGS += -mstrict-align CFLAGS += -std=gnu99 CFLAGS += -ffreestanding CFLAGS += -O2 From patchwork Wed Sep 11 09:14:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Jones X-Patchwork-Id: 1983834 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=fO4hffQ3; 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=Euz6oyDc; 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 4X3Zh41w1zz1y23 for ; Wed, 11 Sep 2024 19:16:36 +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=/Rw/dBFEaYk6q2fxaXbm/OEpJk0nFZaG9vC8j5oIFcQ=; b=fO4hffQ36j0aH1 4AWtUPhdT/t3ZcQjybYQxqw2Yl4jVxKdtN11Gi52LI6hLOoA8uwMKIZ0YeNN+BEC3R9crCSlLRzec 3+kcWeDEOeZsHaQNUHXm6k7vVJ4aM/B64ZXewZwg6ZNlqfb9aP5G9PQA+xnqtPVOBROZ8CTyFo+kw /aMvZxZ6qEzt4ECMpdKw5Q2TAjt77AYjVxTUa7hnPFAon8wDShBieQ7nqG0JaN2PNcAc7/5aeEovV Kk27Jcg1MPjObw8hKNmU0BQw08453dCgDGTih1ricLS43JTTT9PE6XQejGd17FuSrBV4VKsysxU1p aSlvuO+nNGBrU6Gh6fig==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1soJSk-00000008sXQ-3w2C; Wed, 11 Sep 2024 09:16:34 +0000 Received: from out-172.mta1.migadu.com ([95.215.58.172]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1soJQe-00000008rk9-1zGg for kvm-riscv@lists.infradead.org; Wed, 11 Sep 2024 09:14:25 +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=1726046062; 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=MjH3y5GFZG4iHF0CwOafpGZ1X8c3+7VTVQzIHYqdBQI=; b=Euz6oyDcYjtOpteyceqjb20WH4aWa8y1bSxbcm2wTTp8P+Bg8DY4V2Uu36HzRSnssfq8xJ Fqk4vTcyLs8THPrsw8ErJkMKfRzbgxfN2qAvc3U9npGnGrsXuGEbz5vrCRyFnHrOEocuYk S9sibAFjqJUI65I0k8/wmhqsIDpM0ks= 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, Nicholas Piggin Subject: [kvm-unit-tests PATCH v3 2/5] Makefile: Prepare for clang EFI builds Date: Wed, 11 Sep 2024 11:14:09 +0200 Message-ID: <20240911091406.134240-9-andrew.jones@linux.dev> In-Reply-To: <20240911091406.134240-7-andrew.jones@linux.dev> References: <20240911091406.134240-7-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-20240911_021424_719698_3795313C X-CRM114-Status: UNSURE ( 6.98 ) 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_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 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.172 listed in sa-accredit.habeas.com] 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.172 listed in sa-trusted.bondedsender.org] 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.172 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 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. (Eliminating the warning is preferred to reworking the struct, because the implementation is imported verbatim from Linux.) Reviewed-by: Nicholas Piggin Signed-off-by: Andrew Jones --- 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 11 09:14:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Jones X-Patchwork-Id: 1983836 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=hmzCIgRG; 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=M/L8jvpC; 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 4X3Zh442L3z1y1C for ; Wed, 11 Sep 2024 19:16:36 +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=9MIne2HAIfJjv/OY3b0vlxbRF95O3tycOH/57lrZaMs=; b=hmzCIgRGzbfC36 W9ltnU5FLHZfuWzwT9H1EYqGZ8umpoTDXUFE4lhSVFlKbUcZwrxD6Jas1WqOFd8x4ADuHq73g69DV zxTUkQNW4hQBYLjsfDCB87Ct2P24jrKmE2tfPDCLIDXbPqT7tIrQyr9BncUSRcUSrzXw9yvYhMAmp VZ95K8YmqUmT44OuuxWGcQKGJjupbKNYJWYc8DcxLy9Ln41vA5ncS2bFsPynF4Xi/4mbUEyfL6V8H KmaTuvqXmE7t1QkOyLAqHJCf2jRmpbNE2hhfV6F1j8U/jjzmRbOIPV9G7Tbv0ex+5PrZ0NeM0raGe sfAr65iq92fThaCME/SQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1soJSl-00000008sXd-17IF; Wed, 11 Sep 2024 09:16:35 +0000 Received: from out-172.mta0.migadu.com ([2001:41d0:1004:224b::ac]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1soJQh-00000008rlU-0qHv for kvm-riscv@lists.infradead.org; Wed, 11 Sep 2024 09:14:28 +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=1726046065; 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=OsPMkwGnmjxo8sJCbsJnrotMn1FMT4yM5h3OsBJs5A4=; b=M/L8jvpCq6Lms6T+WyzTPt0/nG1hiGx8NuLu96rSqL0Ticw900TLKyJeW0+3jx6XRkNbXi KnQUzkSx2GDETZ5LMzJR9rHnVzDiz7FxKrodiwtzOpcQ3aSXyYEHkyxUKMiyoBDqNa3QjB M1MsIzc6cVG428WiTpu7L7fMBcawvUE= 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, Nicholas Piggin Subject: [kvm-unit-tests PATCH v3 3/5] configure: Support cross compiling with clang Date: Wed, 11 Sep 2024 11:14:10 +0200 Message-ID: <20240911091406.134240-10-andrew.jones@linux.dev> In-Reply-To: <20240911091406.134240-7-andrew.jones@linux.dev> References: <20240911091406.134240-7-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-20240911_021427_398193_EE066232 X-CRM114-Status: GOOD ( 10.59 ) 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_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 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 Reviewed-by: Nicholas Piggin Signed-off-by: Andrew Jones --- 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 11 09:14:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Jones X-Patchwork-Id: 1983835 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=CBnK+IR0; 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=mMpImR09; 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 4X3Zh50LKNz1y21 for ; Wed, 11 Sep 2024 19:16:36 +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=DOd7IDakJIWSJUSbufi1g00mPVHXdRHhJj/Ee5DlNqI=; b=CBnK+IR0mGI4Yp PMkEZyu8kEmASOW7LKk1gbA5GTTUJBZRykTtDt9WJmKYDspxbXlEBEnSLpPxj5y+uDVlNM1ym/qyL d6Ju0QPZ8tD4a37dkBwJg1Nv0Hb0FgNNJzME2cm8gaZx9gg1pWoBmaO1ruTi+axxgYOmXzqKUK7of pjQmM+C3DjgH15Dyc9hBsSYTfNhGNIf8gOstGXRZM5gakQeHN4YopcJHpHR6aF38j8eZ/raHoXQRb 7aemyyXXqqKAz3EkBVQSDbrTOyUixfXusY8PGINsma49kdEWWBpwfVmh8O87Cb5aPRzH8R+j1CYIc b3s2mbgZZcIcNhR8gcIA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1soJSl-00000008sXq-2Zql; Wed, 11 Sep 2024 09:16:35 +0000 Received: from out-183.mta1.migadu.com ([95.215.58.183]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1soJQl-00000008rn8-06HQ for kvm-riscv@lists.infradead.org; Wed, 11 Sep 2024 09:14:33 +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=1726046069; 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=yRGT6lb3tzG+UP86H6atAuwQ+MUVOTAVqFZGkFQMd2U=; b=mMpImR09w2r4shh9WrAx7m6mzN4lsFSyiZjLV4VCcHc4YJQ3JGZES5FqeopE8XVo/XzL94 B0ie+xtkURN/V3Qe0QgAvUK5x95hN7RkW0sqJ5pvVVVAMbu3ngNkZ1XwAhb6PgXF+ai30Q bb9QlyQCHByzWJSZAJCjb4zAzxEIK4Q= 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, Nicholas Piggin Subject: [kvm-unit-tests PATCH v3 4/5] riscv: gitlab-ci: Add clang build tests Date: Wed, 11 Sep 2024 11:14:11 +0200 Message-ID: <20240911091406.134240-11-andrew.jones@linux.dev> In-Reply-To: <20240911091406.134240-7-andrew.jones@linux.dev> References: <20240911091406.134240-7-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-20240911_021431_226712_D7399562 X-CRM114-Status: UNSURE ( 5.49 ) 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: 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 Acked-by: Nicholas Piggin Signed-off-by: Andrew Jones --- .gitlab-ci.yml | 43 ++++++++++++++++++++++++++++++++++++ [...] Content analysis details: (-2.8 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [95.215.58.183 listed in list.dnswl.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.183 listed in sa-accredit.habeas.com] 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.183 listed in sa-trusted.bondedsender.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 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.183 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 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 Acked-by: Nicholas Piggin Signed-off-by: Andrew Jones --- .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: From patchwork Wed Sep 11 09:14:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Jones X-Patchwork-Id: 1983837 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=C3S6TGMi; 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=kvJKJTyz; 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 4X3Zh556nwz1y24 for ; Wed, 11 Sep 2024 19:16:37 +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=AzmewKCjVO+Jmm2pqzov4Lib2CdNImu5KaJg7sF0t78=; b=C3S6TGMi94/Cc2 k7Wi3aZEybzOYCNdFEZFauFfLzHFC3J7leX7MLeyH5v0IF2UYFomRwaveSYSRDm6y4LHgRIyfrz8R qEjTlZG8GP9JGGiMr3JCtp7/kxY9YA8ruQAbev+i5CK72CNBULW4pZqefilbittRmm1Ki1ra8+PFk HPi3CjBR7ReLTpJ5Y9fB1VxhAWtnAVkww25MxvUv7JIhRzvEPVVWPIm+AeqdsSoowK6XAl0iVsATV FdHM5mdsgjG5O4MC8+pW/ZWD58ulJ6mqNLP5F05dKvten0GQDgY4KDX/WLmtwICwK76tNOPWop8ax njhCbmuQf1Uj8/ABtzMA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1soJSl-00000008sY4-3zs6; Wed, 11 Sep 2024 09:16:35 +0000 Received: from out-184.mta1.migadu.com ([95.215.58.184]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1soJQn-00000008roi-25QL for kvm-riscv@lists.infradead.org; Wed, 11 Sep 2024 09:14:35 +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=1726046071; 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=MtkZ2ndqa6RRIHxpRtEfZPe4ynCm7zVypuZ3bs/mIVA=; b=kvJKJTyzy6/oa6wrDUhUrfV6A9jOvecWoWd0cPy5Q/L7HBUALkRDu7Y55grHtuQnoCclCJ QNbmDnB+s+iinrVd0DEJ5iBSfY/mZOVza7kFm7RZGobq2AV4wJnAzdF8QlX43/DrOB6g4K kKDmoefNcZGmug1DHpbtXxxEjb0EQxw= 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 v3 5/5] README: Add cross and clang recipes Date: Wed, 11 Sep 2024 11:14:12 +0200 Message-ID: <20240911091406.134240-12-andrew.jones@linux.dev> In-Reply-To: <20240911091406.134240-7-andrew.jones@linux.dev> References: <20240911091406.134240-7-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-20240911_021433_790111_42CAD0CB X-CRM114-Status: UNSURE ( 6.59 ) 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: Add configure command line examples for cross-compiling, for compiling with clang, and for cross-compiling with clang. Signed-off-by: Andrew Jones --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) Content analysis details: (-2.8 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [95.215.58.184 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 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.184 listed in sa-accredit.habeas.com] 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.184 listed in sa-trusted.bondedsender.org] 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.184 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 Add configure command line examples for cross-compiling, for compiling with clang, and for cross-compiling with clang. Signed-off-by: Andrew Jones --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/README.md b/README.md index 2d6f7db5605c..be07dc28a094 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,28 @@ in this directory. Test images are created in ./ARCH/\*.flat NOTE: GCC cross-compiler is required for [build on macOS](README.macOS.md). +## Cross-compiling + +A cross compiler may be configured by specifying a cross prefix. For example, +for arm64 + + ./configure --arch=arm64 --cross-prefix=aarch64-linux-gnu- + make + +## clang + +clang may be used as an alternative to gcc. + + ./configure --cc=clang + make + +clang may also be used with cross binutils when cross-compiling. For example, +for riscv64 + + ./configure --arch=riscv64 --cc=clang --cflags='--target=riscv64' \ + --cross-prefix=riscv64-linux-gnu- + make + ## Standalone tests The tests can be built as standalone. To create and use standalone tests do: