Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp1504480lqa; Mon, 29 Apr 2024 10:13:18 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUbg7jVyL5ULb7jhauNo1w9a4dhEs/baXM1iNpLn7i7D+c5FYUFY/EP3d36nci3PuC6zuSTkNMca8xnxeJiyTMkrr/WSt9551Qt24h8IQ== X-Google-Smtp-Source: AGHT+IGn6YEyF/rpCsmsMKGxUf14NDo1OjDGQDPhaKugtBjnBaxAZR2rdFPKFOMcBuT7545V7s/Z X-Received: by 2002:a17:906:80e:b0:a52:3ecb:ad83 with SMTP id e14-20020a170906080e00b00a523ecbad83mr153083ejd.38.1714410797936; Mon, 29 Apr 2024 10:13:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714410797; cv=pass; d=google.com; s=arc-20160816; b=Yd9tdYXWEdZY06ZCu/ZAObEjoWl83v8OFtlK/DYk6ZWHVP0OiRwJOhDdZqX8Tzoh22 dObFf9BYcmKXQtqkkJ3I/quDozzE9VWyyz4ktuk9bSO7jlCji2dIG3fguy+1hJ4+LySl NFQ01MWichcshHrGnGYdSvXeJa6hSwhpOaLuT/eG5+FvUEHeuEfII6X03/ckQjLgez7I mkbsLjmWbe89nK7+1q9DCTz2speW7Z36ZQA4nPfuDBIFUCNuuDYLWtU7D3nVzlbEWX68 HN6+1ZFcaYc11zcAYly7UhX8Xlm1gsHkIh3x0zJ4+JAVjUQV7tewSv3IIsvsxScxnhCS s+8g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=RYAqBXsNEvrSMnv0mKSil9XtJ+T/DO6BwhlxG7738Uw=; fh=FCimrnA91ZH/JR5HzWut0qdaIOpe3pkowmJPvEKp7MI=; b=vS8PkXb/wNTg2jLRUIJlAe3kj09Oi5+xt8gBaJLGG57eYxNk7sIgprz8rEpvrww2cH eeSRLLUjXhP+EWzmcSKZmH578KiQTO65SZhu1GN2mEPhsY8Nub9ckwv+iTiwPtYFmWth 6p9yxkvBtzfXMv7vkcuIPsy43pUuT1rpPgCMu+iWUFEbcVJNydxWKBBWZo/I6SBF0Ypa T/Mih5ciwndOulonBEyeBM1gOfpajEj/k4Vtz0a/vECKUMmrMZoDyalL5QGAPCl4CWXz p8yYB3ZLaURCE3omu2f4pj0FZrqBb41lVpz1nnobu4nO5H/z/fLv+jz/OBmjnRX8hm+A JoFw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=sgbkYWiU; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-162728-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-162728-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id s20-20020a170906a19400b00a51a78f4ed7si14041550ejy.220.2024.04.29.10.13.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Apr 2024 10:13:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-162728-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=sgbkYWiU; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-162728-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-162728-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id CD6E61F227F1 for ; Mon, 29 Apr 2024 17:11:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5C58886655; Mon, 29 Apr 2024 17:11:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="sgbkYWiU" Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3AF238627D for ; Mon, 29 Apr 2024 17:11:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714410695; cv=none; b=IEWYOYUHQr51F9r7Uwr9qIc6YaOVV7N5k449qLt/a4ciL2GhYY963dIbqu04O+mLaDtsoecnAJrShJIcgK3/U+vGnYbyBrv6zCuhS/jsub6bASfll0zCSddg4ChTCWvjxqHmSa+c6BE6M/0AcnqDQmdQBZa3VKxFOOmRJ2/7PZs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714410695; c=relaxed/simple; bh=gHKyucjbhj8cfFBnv6FeWZ+CCqaY0W6eus79r1bDca4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=mu9e6McdgTsXqfTrRkbRiGXIN+eIhXV8SLphPkfs/vjMAl3RcF1N+Mx0Aw2BcoHbo39sa/NFeq1TpTfRDSrnglngC5x1G3lOWfRQwSAgFKk6pJjoU1PzOg+gq3v8O2JIIVPLGj4zeo3RlRIxTHZrcxFj+rHFMUiL2zVl06aOe6U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=sgbkYWiU; arc=none smtp.client-ip=209.85.221.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-wr1-f48.google.com with SMTP id ffacd0b85a97d-349545c3eb8so3245750f8f.2 for ; Mon, 29 Apr 2024 10:11:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714410691; x=1715015491; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=RYAqBXsNEvrSMnv0mKSil9XtJ+T/DO6BwhlxG7738Uw=; b=sgbkYWiUhRKgWieli5Dji3GWJ+NeTrPzU62B2/jZHn9HwRvae1xhVr75BKT7u+DHQg uiC05d0TelGfUcLZrpLvnVa7OcZuzDf/ppVCsNh1R6dHj/N6ZlT8ESmEIWcn6eA8/njn wideUNKCIiWPHzIJ7LsfhFBX7tsg+o7pTXMwRvnNhDr/eKDsrDgUpaBZV/TkvYqr7Fzi 6hJ2SmnB+VrbKGKLHFh7PuR0DyNuueZxBrxmcPKh2gdQNTSTQl3Myehswnm4XMMW/FRI tBWvUqv+0GeHdpJD4VoYYQ1Uwnvpx/RID3dx8Mk7GbUH8w2uyKG76gLA/4jzGoF/COog 2vpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714410691; x=1715015491; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=RYAqBXsNEvrSMnv0mKSil9XtJ+T/DO6BwhlxG7738Uw=; b=lwOCZppTJekgzhiCYjoITwLmuzBOgI7denOoiAMJaEkkHB8kptOUrxqlbK5iwOxuRl lFYH82fCM47pCs3ADR1QIDhKY+1+kNOY6+GLcbw3vuTCj+0yGP5OpGyNL2qxpu/X5Y5g ECppCptuz1B8KfSTSuPHZxKtwbXADp6OXbMC6pS0BH9Sq3jlHhSdVMuNrGBwslv30BIo Wl/L9tG4L4hgmcKMGFe2wi3MG7aII0S9NAUjbC+GO9DcMQKcxRs4zkUY/CqXJVnJfzjn XQvO2ieou+wKXtUEvkxf1Yf2IGUSoOSC9nOm/rruHwOB6kiimhi9b1A4eDKn0xTwgHrO sFow== X-Forwarded-Encrypted: i=1; AJvYcCXz6AHUIFYsP5Fik/12LqOwcVxn617/dF/pWyA8Gn6rnyQ/2lN3gzAkAc/bOAAoMcpKg8ny63B4FR41+aiqeBKPNg5OVJOrxfe6wEhB X-Gm-Message-State: AOJu0YxSxbqbVKseSdyZzawiU2qtBL3msPIOS9/faCkoflhj1uoJbMnE BrDDPndmw7Tbt/8+xflAs/UPt5vdD2Mw+5FXdCdQTbnSojsc9kSfiasC9rFI4G0= X-Received: by 2002:a5d:45cb:0:b0:33e:7896:a9d7 with SMTP id b11-20020a5d45cb000000b0033e7896a9d7mr292530wrs.67.1714410691396; Mon, 29 Apr 2024 10:11:31 -0700 (PDT) Received: from myrica ([2.221.137.100]) by smtp.gmail.com with ESMTPSA id y7-20020a5d6207000000b00346f9071405sm30075412wru.21.2024.04.29.10.11.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Apr 2024 10:11:31 -0700 (PDT) Date: Mon, 29 Apr 2024 18:11:45 +0100 From: Jean-Philippe Brucker To: =?utf-8?B?QmrDtnJuIFTDtnBlbA==?= Cc: Jiri Olsa , Arnaldo Carvalho de Melo , linux-kernel@vger.kernel.org, =?utf-8?B?QmrDtnJuIFTDtnBlbA==?= , Nathan Chancellor , Nick Desaulniers , Tom Rix , bpf@vger.kernel.org, Anders Roxell , llvm@lists.linux.dev Subject: Re: [PATCH v2] tools/build: Add clang cross-compilation flags to feature detection Message-ID: <20240429171145.GA241057@myrica> References: <20231102103252.247147-1-bjorn@kernel.org> <87o79wxvnu.fsf@all.your.base.are.belong.to.us> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87o79wxvnu.fsf@all.your.base.are.belong.to.us> On Fri, Apr 26, 2024 at 12:31:17PM +0200, Björn Töpel wrote: > Jiri Olsa writes: > > > On Thu, Nov 02, 2023 at 11:32:52AM +0100, Björn Töpel wrote: > >> From: Björn Töpel > >> > >> When a tool cross-build has LLVM=1 set, the clang cross-compilation > >> flags are not passed to the feature detection build system. This > >> results in the host's features are detected instead of the targets. > >> > >> E.g, triggering a cross-build of bpftool: > >> > >> cd tools/bpf/bpftool > >> make ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu- LLVM=1 > >> > >> would report the host's, and not the target's features. > >> > >> Correct the issue by passing the CLANG_CROSS_FLAGS variable to the > >> feature detection makefile. > >> > >> Fixes: cebdb7374577 ("tools: Help cross-building with clang") > >> Signed-off-by: Björn Töpel > > > > Acked-by: Jiri Olsa > > Waking up the dead! > > Arnaldo, Jean-Philippe: I'm still stung by what this patch fixes. LMK > what you need from me/this patch to pick it up. I guess the problem is these files don't have a specific tree. Since you mention BPF maybe it should go through the BPF tree, in which case you could resend to the tools/bpf maintainers (and "PATCH bpf" subject prefix) FWIW the change looks good to me: Reviewed-by: Jean-Philippe Brucker