Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp4411643rwr; Mon, 8 May 2023 07:21:11 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ570ke5WM9800DKe5hE5XywFjEJI13CeusweYm8Ny35SWaHAfJNTJ2tV9ws4LsCKgHwJWVX X-Received: by 2002:a05:6a00:179b:b0:63b:62d1:d868 with SMTP id s27-20020a056a00179b00b0063b62d1d868mr15913916pfg.8.1683555671606; Mon, 08 May 2023 07:21:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683555671; cv=none; d=google.com; s=arc-20160816; b=OVViPojd3wkGJwPkLLOLxritY5M1N81Ujc+WDtod7k+T+r4pwKf92L2F8bb9m2WPxJ Cv89qIxd37EzKOArC8uB0RLM9O4JPFzbuTZObA7rTWG0+b5DpVXhUJ964pbhbjH1gW0J jutl3IKScfBcGHXJcuJfMKTY0/DjFDfwOx23jwYtiytd0uiLfwfKime07gbGZ4YvpSjn yJU58qj5UzuynKymJr1Jqur/KJxbkbtICqYcy9lwwHtcf286HwU+BF/Yt4Xpn+aP+K5C SVKQFJelavJ7ZY0TdDrgzMdyBGwC+gGaDN90LmiSM4n/jFwSg4WunjALB0LHludk7LqI K74Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:dkim-signature :dkim-signature:date; bh=0CW4Oxt6tgBDx4EZWBOZEPdQdc5GDnBQfLbNGBkiVv4=; b=Bhgx1F1mLO5GmzrbaqCqMDSUk9QOoCJ9Oo1JRMQ/2XKZjMoQRlRdTtjLIQ7gnnIkFn P9md8Z6LuVFKFFAYBZcRPAlQsFX0fJvtToATl+WpRw/tMo/keSY7yg1OzrbYz3ta4+5O xsIMxrhA4eOlWUUecK0HJop/nOffwjUPme+za65ay3aBEXjeVXBq1c1T8A+Yu7PHV8yq 6RiDU2WT+VjLU/DsMHEdRwj4g7FUksq8o1nji3VUq+Se5JXnrUIHMVaGSob4ulXUUUt4 QmcgAWMma/8rf40Wm2oe+3mZ5G5zLJrdpUW4H6KBm0BnlpPB0hd3zZyI8DKMEcmbKLqT uSHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=X4SNdbpp; dkim=neutral (no key) header.i=@linutronix.de; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n21-20020a638f15000000b005217446e9fdsi8391146pgd.669.2023.05.08.07.20.57; Mon, 08 May 2023 07:21:11 -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; dkim=pass header.i=@linutronix.de header.s=2020 header.b=X4SNdbpp; dkim=neutral (no key) header.i=@linutronix.de; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234461AbjEHOLT (ORCPT + 99 others); Mon, 8 May 2023 10:11:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49966 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234464AbjEHOLN (ORCPT ); Mon, 8 May 2023 10:11:13 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 46E4934121; Mon, 8 May 2023 07:11:06 -0700 (PDT) Date: Mon, 8 May 2023 16:11:03 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1683555064; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=0CW4Oxt6tgBDx4EZWBOZEPdQdc5GDnBQfLbNGBkiVv4=; b=X4SNdbppA5MERKaBrIpNtP6vpEMhhILRycjTD77g5tgeTGfeUq8gk3n8GcFnOfc3TaMp4x OBF4J95LWPZMjmkV+qx+Kud75BGmzBGiYqFAjU8WN2x8ppJSUKi2F28rj6yzOkiZgHoMB7 Zu9L1mZMxNa4i+vcyDTjm8J8vEF0NIoYwuoxnpLPwOaqfYmS62lvzYcsR7UtovX+6I7G0H jEPqfpdqGfPW7/xWVpbfw93aaqvXfwohiestqGelxKED5stUt27vimkALJdcVSBozG1l52 zop1N3movPQNUhR8szByUnhTEENR+mpAPqw9Xwu2gKpOjopUDxrfdyFtlppqFg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1683555064; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=0CW4Oxt6tgBDx4EZWBOZEPdQdc5GDnBQfLbNGBkiVv4=; b=WP4fSM2rpc6FWChlzYEDb/dSood2U58WPY53v2FJxIJQlgWNMJcbeagvKhIRS3X7bFIhPl YPmltLBGNK/N3YCQ== From: "Ahmed S. Darwish" To: Masahiro Yamada Cc: Nathan Chancellor , Nick Desaulniers , Nicolas Schier , Thomas Gleixner , linux-kbuild@vger.kernel.org, LKML Subject: Re: [PATCH v1 1/1] scripts/tags.sh: Fix gtags generation for O= kernel builds Message-ID: References: <20230504201833.202494-1-darwi@linutronix.de> <20230504201833.202494-2-darwi@linutronix.de> <20230504213246.GB1666363@dev-arch.thelio-3990X> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Hi Masahiro, On Fri, 05 May 2023, Masahiro Yamada wrote: > > It is wrong to check whether you are building out of the > source tree. See line 159 of the Makefile. > Oh, didn't think about that case. Thanks for the reference and the further clarification in reply. I'll remove the ${O} check then and use saner mechanisms. > BTW, this patch does not work for me. > It spits a ton of "not found" warnings, then generates > empty tags. > > > $ make O=build gtags Interesting... When doing: $ make O=../build gtags scripts/tags.sh "$tree" variable is set to the absolute path of the kernel source tree. Thus all the paths fed to gtags are absolute and this patch series works. When doing what you tested with: $ make O=build/ gtags scripts/tags.sh "$tree" variable is set to the path of the kernel source tree *relative* to O=build/. So in that case kernel source "$tree" equals ".." With this series, the build will fail as gtags current working dir is the kernel source tree, and all the fed paths are thus invalid as they're relative to O=build/ instead. Without this series the build will still fail given the original problem of having the files "outside the source tree", where gtags thinks the source tree is "build/". I'll think of something that can cover the both cases. Kind regards, Ahmed -- Linutronix GmbH