Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp2117936rwo; Thu, 3 Aug 2023 05:07:33 -0700 (PDT) X-Google-Smtp-Source: APBJJlGRK+AjLJsdx/cdBAHtGSu5mUB3JE2frx567hP5zaIVn2pdzOXT820mQ+dUJFJQoM/Ec69U X-Received: by 2002:a05:6808:201f:b0:3a7:5ae:100f with SMTP id q31-20020a056808201f00b003a705ae100fmr21561144oiw.43.1691064453058; Thu, 03 Aug 2023 05:07:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691064453; cv=none; d=google.com; s=arc-20160816; b=ABicV7R43P0SmDNpN9rC5D2AxXcRCVkftoa64QQnlq87Ib9sNitlax4+XiHU2tDlRA J+GcG9ulGy/55QK9WA2Ll21Vejicpx+vlu5NfSeKImA5Ib9HJIi69ac6iB9gFoaHFaAy c/QPjzP6Az8Vr43jwGnNiBM62I80tNOFOwWKklGtSad0qmwoaQuGSppvL16rT8CX0uID KlK4UKF+sifHf870wuldZPRW/sD8V3mzKnojOohJbUUJQAHsvCCAmelDCl91xpllgxT5 KywKnopZM9pH/JaI5YmPWghaSz6IHvF/V8RhMqIhnPzmJ+7IlYdaxnjdjbAj1+ezMIg4 7XmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:feedback-id:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from; bh=ygxHV23K+ymANLUqH1xQ6kx42MAobAitf7jTT2use/M=; fh=TsKNe/ZSymFDLfCGQokP79s6S6Z9FKHYw1KoAUSYM0Y=; b=ONObbTPCPuOjoSejcK2qN4IE+XTC3zAIOreQmJOLAfRTZBwIYjqIih1Q0PApXKn4VX p0P+cf9mDz/1u5jyN1Te2Hytr5qS+BUgSQJlr3mV4Y7XAYAkYewTMnx0OmOGO/TS7XS8 Q4NxPLIXDnFp/hl+XJ/Fvr68za8bcbeEehSikkXv3+BGisRlm5vBhd3Is6NnizA6PQq/ O1oPWQAtWqh+DZpYcdD6ffIsg3cD7xnFAA2W+2mXaSDQhD+BEFusKANhVUD7PqOe7Nbi qKjI5mH6jxSMR5YGXlzulnYuFUwRZcpVkpkLRnvAQjsKMtNbcyTFqgxH0Di3JEt977vW 8J4w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d71-20020a63364a000000b00563d3dd0d4csi12384155pga.149.2023.08.03.05.07.19; Thu, 03 Aug 2023 05:07:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234364AbjHCLvI (ORCPT + 99 others); Thu, 3 Aug 2023 07:51:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47326 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229924AbjHCLvG (ORCPT ); Thu, 3 Aug 2023 07:51:06 -0400 Received: from bg4.exmail.qq.com (bg4.exmail.qq.com [43.155.65.254]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F3AE72D54; Thu, 3 Aug 2023 04:50:59 -0700 (PDT) X-QQ-mid: bizesmtp75t1691063449tqmo2qcn Received: from linux-lab-host.localdomain ( [116.30.131.233]) by bizesmtp.qq.com (ESMTP) with id ; Thu, 03 Aug 2023 19:50:48 +0800 (CST) X-QQ-SSF: 01200000000000E0X000000A0000000 X-QQ-FEAT: mRz6/7wsmIj3dfIjjNVLcgKGmUWx0z0rhG3IvarZHhF2M7vaSx63g6eOTeTaZ uHBgDLGmUrfQEdz7oHgfhMEwAOJCN6zBQMELEfoCfQ8msY6ksEOYpkzJEfVXqdH3o6kK1XT YZP/mn27FGUkoliO7GuSlhGZsJwdzwgTqCvxVGB2FdzsXiPESZqCT3m02NuvDTmw21pX11A C3LVEaiUynRo+baIxth+sDuzdG6Vi2sMehODujYsHsFOZ4hSSudBJ7naq5vzeugs9Tkw6ny Qad89TXcK5NDGUXxL2zsY3mW60k0dHThvcM9wMjuT820x8NdOZavjbPiR0aI0+alO+aLLLR +7EFmGWVBzpxCdGpYA7P+mmkfsSt1t8D75zBfWkL59u6EQIC3pvrDWUbB0//k2qLOQG0TNr X-QQ-GoodBg: 0 X-BIZMAIL-ID: 10404998446730890993 From: Zhangjin Wu To: thomas@t-8ch.de, w@1wt.eu Cc: falcon@tinylab.org, arnd@arndb.de, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, tanyuan@tinylab.org Subject: [PATCH v5 7/8] selftests/nolibc: allow customize CROSS_COMPILE by architecture Date: Thu, 3 Aug 2023 19:50:48 +0800 Message-Id: <8d7f208be1b85528114ead3b63aeb954371a996e.1691062722.git.falcon@tinylab.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:tinylab.org:qybglogicsvrgz:qybglogicsvrgz5a-1 X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_RPBL, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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/selftests/nolibc/Makefile index ec290cd82e21..6e34d364a177 100644 --- a/tools/testing/selftests/nolibc/Makefile +++ b/tools/testing/selftests/nolibc/Makefile @@ -55,6 +55,12 @@ IMAGE_loongarch = arch/loongarch/boot/vmlinuz.efi IMAGE = $(IMAGE_$(XARCH)) IMAGE_NAME = $(notdir $(IMAGE)) +# CROSS_COMPILE: cross toolchain prefix by architecture +CROSS_COMPILE ?= $(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 = defconfig DEFCONFIG_x86_64 = defconfig -- 2.25.1