Received: by 2002:a05:7412:1703:b0:e2:908c:2ebd with SMTP id dm3csp1870159rdb; Sun, 27 Aug 2023 00:19:08 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFFlLipQnRmIN0qEYPoboFQ8meksTaX4t8sOp3lU1+XXyZF0Qn0ufMCw+y9AZXcesD1/mtQ X-Received: by 2002:a05:6830:84:b0:6bc:9078:81c8 with SMTP id a4-20020a056830008400b006bc907881c8mr9714064oto.20.1693120747677; Sun, 27 Aug 2023 00:19:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693120747; cv=none; d=google.com; s=arc-20160816; b=wIBX6Gkyc6aAOMHR3HbcXBxf4UsqK7sIdwTJtfydILRGgaupGwDtR8xa+7ywGYhZyq pHd0LQDM08L77RL8hEJvnSVu9qXIk++zsLOXB5r+QRPnuDzqSf2QIapystY44bEQOTBQ KLClzMJnBd7pGqrHL06hwdUBXb05vtlffaA0P6qSHpXOQ7pEYrZE7fo8SvL6TGVXpR5G v9qyfJMKYRx66u5r9rbWHv0UOZo9hZOFxI9b99efpqtRYdrfWyfeMSFkuZNjUWMyN0wt Fn+3/Jqsmql5dzWTATyX7dGzeQ5zf9STJeMOA8MnCtNhD+sL1nJWAg0R5EzaioMkKG+u chyA== 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=Fe1Jtv/sakf4n3Q+QJnUlC91OpJwoBo7/ZtLBbviwZE=; fh=8ggwjejMi1BrOcfnsrU8V5Acf4NqQp6QoK1nvte1Cl0=; b=buTdDHx67AoRMv0+wzoJ6RBDRmpXyhIOJD6ssIWahUUNWHKq257j0nynwcjbZhbcBO ygpdb7eqsJI8bZqNL1ohXhKyZH00BuTAqmnlYEK1dcl/nzj6XraADIYibuRfLd6HPBq2 +lhc6H1LfLN6UgJgyyUgUjQYgDLuF9IQY4hXGOkolqxpmUHLcEUMFdxtzb8Sin6NfRHR jAkWWWt7eoFoQ7aS1UFSrR8PaJlm3G1gk4ZiBQ/J3u94C7cA/CST8Gm5GrZKUa33wYTS 9tl7fBE9vmEeWwURr1uDX9buNN25a5KBHcbyJS2QD9BmGKhmb+JpjAA/mJmBetO4eHYF 6g3Q== 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 w8-20020a63f508000000b00565dd3fbfdfsi5222494pgh.214.2023.08.27.00.18.32; Sun, 27 Aug 2023 00:19:07 -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 S229671AbjH0HJt (ORCPT + 99 others); Sun, 27 Aug 2023 03:09:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57774 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229659AbjH0HJa (ORCPT ); Sun, 27 Aug 2023 03:09:30 -0400 Received: from bg4.exmail.qq.com (bg4.exmail.qq.com [43.155.65.254]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57951E0; Sun, 27 Aug 2023 00:09:25 -0700 (PDT) X-QQ-mid: bizesmtp76t1693120152to4qhmj2 Received: from linux-lab-host.localdomain ( [116.30.127.49]) by bizesmtp.qq.com (ESMTP) with id ; Sun, 27 Aug 2023 15:09:11 +0800 (CST) X-QQ-SSF: 01200000000000E0Y000000A0000000 X-QQ-FEAT: mhgCCnGOC3zBXXZrve8spmu5rA4BAZw/BqKCcFYCz5lTN2Pboydlj1TV8z8Xe Qb4n3CE0MiqiRCAWbt2GGlsH962GOO0A/so6v2Y6B7znXDJttgiZ1KvhExRBvZ6uVnpEDBI kMdVCtZ2Lgt5fQ8S5d7zaxX90+00vgACUesXi1q3FtqedEAf4UajobgDdoy7WOwUnCBQHmR HPcCVJ0wYannfKUGi7si/QG293pbexmstR+CPxgl1iN8k4ODEAjwhXViSprLOIdNfVi9kpr opJum8+ahjJGcVfHgRDSchBxKV5ts9iOupKiRn8YBgVEACD2z6yr3DFzrKGh3Eo8TNUgBCv PN3Ai5KMCvHOo+0zJGgr2ephFZN7wDaI1vWsdf43IJ2mYpCFYW1w9UHLI3rWw== X-QQ-GoodBg: 0 X-BIZMAIL-ID: 3324772232417533549 From: Zhangjin Wu To: tanyuan@tinylab.org Cc: arnd@arndb.de, falcon@tinylab.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux@weissschuh.net, thomas@t-8ch.de, w@1wt.eu Subject: Re: [PATCH v2 3/3] selftests/nolibc: fix up O= option support Date: Sun, 27 Aug 2023 15:09:09 +0800 Message-Id: <20230827070909.6999-1-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 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 Hi, Yuan > Hi Zhangjin and Willy, > > On 8/26/2023 12:30 PM, Zhangjin Wu wrote: [...] > > > > ubuntu@linux-lab:/labs/linux-lab/src/linux-stable/tools/testing/selftests/nolibc$ find sysroot/ -name "errno.h" > > sysroot/i386/include/errno.h > > sysroot/i386/include/asm-generic/errno.h > > sysroot/i386/include/asm/errno.h --> here it is > > sysroot/i386/include/linux/errno.h > > sysroot/x86/include/errno.h > > sysroot/x86/include/asm-generic/errno.h > > sysroot/x86/include/asm/errno.h --> here it is > > sysroot/x86/include/linux/errno.h > > > > That also means, to use O=out for run-user, we also need to use O=out for > > defconfig (and kernel ...) too, otherwise, the top-level source code tree will > > be polluated. > > > > Seems a manual mrproper on top-level source code tree is always required for a > > new iteration, so, it may be ok to pick this patch with a note on the potential > > error. > > There are two potential solutions for addressing this issue. > > The first option involves copying > 'linux/arch/x86/include/generated/uapi/asm/' to 'sysroot/x86/include/' > during the make of target headers_standalone. > Will this work when linux/arch/x86/include/generated/uapi/asm/ is stale? for example, when linux/arch/x86/include/generated/uapi/asm/ is there for v6.1, but we are installing v6.5 sysroot? > The second approach entails displaying an error message when the code > tree is not clean and prompting users to manually execute 'make > mrproper'. In this case, we can utilize the target 'outputmakefile' from > the root makefile directly. > A question is, without O= option, will this 'outputmakefile' always require to do mrproper (when we have already done defconfig, kernel or run without O=)? but currently, seems we don't require to do so. Currently, the asm/errno.h is installed whenever the source code tree is clean or not, the issue is asm/errno.h will not be installed only when O= specified. The root solution may be the generic-y (or generated-y?) in scripts/Makefile.asm-generic should be corrected to work with O= option? but this common code want us to be more careful. > Willy, which method do you prefer? Do you have any alternative > suggestions? :) > > > Besides. using x86_64-linux-gnu- won't reproduce this issue. It searched > and found 'asm/errno.h' in '/usr/include/x86_64-linux-gnu', whereas > 'x86_64-linux' lacks these libraries. > So, the -gnu- toolchain may hide some issues in scripts/Makefile.asm-generic for O= option. Thanks, Zhangjin