From nobody Tue Sep 9 23:04:40 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BF86FC00528 for ; Sat, 5 Aug 2023 18:46:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230231AbjHESqW (ORCPT ); Sat, 5 Aug 2023 14:46:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47958 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230050AbjHESqU (ORCPT ); Sat, 5 Aug 2023 14:46:20 -0400 Received: from smtpbgeu2.qq.com (smtpbgeu2.qq.com [18.194.254.142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D533A1BE4; Sat, 5 Aug 2023 11:46:15 -0700 (PDT) X-QQ-mid: bizesmtp74t1691261166tr51mwlx Received: from linux-lab-host.localdomain ( [116.30.131.233]) by bizesmtp.qq.com (ESMTP) with id ; Sun, 06 Aug 2023 02:46:04 +0800 (CST) X-QQ-SSF: 01200000000000E0X000B00A0000000 X-QQ-FEAT: +bXiSo2NuBc72kCN4qQlj4Lqddv9gwYnm8KLDRKgB14qter2jdJhaXimrmWeM D52Gx8aygUqGks7WCB4egYTk1EGgdkEO4Mcwot44W9Y1Q5PwQDzn/l3o57xypA2QSzQWQu0 DnzqJnukzzvI8wlNJRM0jRPfJe0mWtRftQSA/HyBAaeRbWRkI3IPKW+M5xzHwJNw5iqVaZm b/20AAOOucrtZI9C3sFm+h4XTl+69Z8g7H83NEc29mgajdCYmDy6M52xcVVR+r7HnZnIqDg YrQ4R+/JYYUcRGAj/PPPw/j9whd6kALZXTQqEXji6V6l+THjFC+8sFgdOaMum5HNx+d9nC5 a8RBztzXYf3FvbezqbF5bH6jxV0m64GqVZ3NjvXYVBl0onb/QMkQ/UMYY040Q== X-QQ-GoodBg: 0 X-BIZMAIL-ID: 10931000458716054793 From: Zhangjin Wu To: w@1wt.eu Cc: falcon@tinylab.org, arnd@arndb.de, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, tanyuan@tinylab.org, thomas@t-8ch.de Subject: [PATCH v6 7/8] selftests/nolibc: allow customize CROSS_COMPILE by architecture Date: Sun, 6 Aug 2023 02:46:03 +0800 Message-Id: <8f21df212f07a43d7534dedfd2beb4c8a2e05308.1691259983.git.falcon@tinylab.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:tinylab.org:qybglogicsvrgz:qybglogicsvrgz5a-1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Some cross compilers may not just be prefixed with ARCH, customize them by architecture may simplify the test a lot, especially, when iterate with ARCH. After customizing this for every architecture, the minimal test argument will be architecture itself, no CROSS_COMPILE required to be passed. If the prefix of installed cross compiler is not the same as the one customized, we can also pass CROSS_COMPILE as before or even pass CROSS_COMPILE_. Signed-off-by: Zhangjin Wu --- tools/testing/selftests/nolibc/Makefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selfte= sts/nolibc/Makefile index 452d8e424d28..45d231b9c5c2 100644 --- a/tools/testing/selftests/nolibc/Makefile +++ b/tools/testing/selftests/nolibc/Makefile @@ -55,6 +55,12 @@ IMAGE_loongarch =3D arch/loongarch/boot/vmlinuz.efi IMAGE =3D $(IMAGE_$(XARCH)) IMAGE_NAME =3D $(notdir $(IMAGE)) =20 +# CROSS_COMPILE: cross toolchain prefix by architecture +CROSS_COMPILE ?=3D $(CROSS_COMPILE_$(XARCH)) + +# make sure CC is prefixed with CROSS_COMPILE +$(call allow-override,CC,$(CROSS_COMPILE)gcc) + # default kernel configurations that appear to be usable DEFCONFIG_i386 =3D defconfig DEFCONFIG_x86_64 =3D defconfig --=20 2.25.1