Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp1745353rwb; Sun, 6 Aug 2023 01:38:23 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFO4/nr/abKRB33MwQj/ZEuQiIsq3B73XGvk2SF+sMBJTLsLKrpbDrcSHsTL281eCehuCTU X-Received: by 2002:a17:907:75f5:b0:99b:40b5:1c3b with SMTP id jz21-20020a17090775f500b0099b40b51c3bmr6034378ejc.57.1691311103247; Sun, 06 Aug 2023 01:38:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691311103; cv=none; d=google.com; s=arc-20160816; b=labfGdvtN+/eD4GeYHEbLMmLK+owJ1cmhMo3JUEYqIjJz/+eHB9Q0YFOozGt72gAkA jTVTal3FrKRfwZszG43DRakJ84kSvTtdw5WEY8qM/tD1ilfVd4+2Ob89zQsW+JvY9GwN rWIHOm+uKajrIyqO17fRjWbf2Rrv++okgo2Gwa+oYlgu5ydetaacI0yjVbjwL0LpDfsd 3feArlfJY07HtfKeMW+E68uG1LIvIuO/T730U6hPKSbHJuVt2DZiRzo6wL/xpFneN7Rn /AJs3UhtYSLIkID4aV3TpkE5yUAsEtg7+QSa1BjINe9qjDmOnu3WHwnxd2J76+LMYx6S KDDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=A4yLlcTr0twpGFPE4a1fyj4LKCyE/AkuRLCLkvtCz+Y=; fh=+JBeOadqUsa9XSBIXq4VuB3OufFNBxHjauCOPr6+Aw8=; b=EYUhvEahC5wD02jc1LNUM4GMKOvbqJFrokSp/QlEWVW7n6hgNJXoUyQFbu7i4Cpll2 u4KRPqg0Y1O201X6qAIdjXrxvMxFkuzNHQ5b1+KYOgTqLusmanuW597esVmTBAVebF3a ii1F/svIH7gy46+Qsz0y+qkg03Lnotrr03AIUJQEskwjoXnn1Bib9NVLJX1tnWZxHDUB +xVmTw779aFVv80m4U0EprRIC/ndxAAzcu98TTYXPBhpI9mil2VwRK3xE3EZdkRx+4QY 9+pKCzbqrAQnlIepJ/GOCM8vUpZ17TXMimwVN0eeXpZ3ZDs78VfrhUdirJCYsoRqSfYq ybRQ== 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 rk25-20020a170907215900b00991c8af7ba3si4330459ejb.148.2023.08.06.01.37.48; Sun, 06 Aug 2023 01:38:23 -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 S229649AbjHFIRs (ORCPT + 99 others); Sun, 6 Aug 2023 04:17:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53512 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229510AbjHFIRr (ORCPT ); Sun, 6 Aug 2023 04:17:47 -0400 Received: from 1wt.eu (ded1.1wt.eu [163.172.96.212]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 237EA1BEC; Sun, 6 Aug 2023 01:17:43 -0700 (PDT) Received: (from willy@localhost) by pcw.home.local (8.15.2/8.15.2/Submit) id 3768HVuR011736; Sun, 6 Aug 2023 10:17:31 +0200 Date: Sun, 6 Aug 2023 10:17:31 +0200 From: Willy Tarreau To: Zhangjin Wu Cc: arnd@arndb.de, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, tanyuan@tinylab.org, thomas@t-8ch.de Subject: Re: [PATCH v6 7/8] selftests/nolibc: allow customize CROSS_COMPILE by architecture Message-ID: <20230806081731.GA10627@1wt.eu> References: <8f21df212f07a43d7534dedfd2beb4c8a2e05308.1691259983.git.falcon@tinylab.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8f21df212f07a43d7534dedfd2beb4c8a2e05308.1691259983.git.falcon@tinylab.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_PASS,SPF_PASS autolearn=ham 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 On Sun, Aug 06, 2023 at 02:46:03AM +0800, Zhangjin Wu wrote: > 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 452d8e424d28..45d231b9c5c2 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) > + Note that I feared that it would break my "CC=gcc-5.5.0" and so on but fortunately it did not. However I don't understand what it tries to do nor the problem it tries to solve (even the commit message is quite unclear to me). I'm leaving it aside anyway but I wanted to let you know. Willy