Received: by 2002:ab2:3c46:0:b0:1f5:f2ab:c469 with SMTP id x6csp177350lqf; Fri, 26 Apr 2024 03:32:04 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX39+88UF4XiKwz1gd/6AlfMDyAsYx2j1BsGAFxnHPzgEqcmOx3HDLDawZSNE9EbhdbUYP8tPJk8VpmmCA/LujeHPdZI+3iU8EKjUMxuQ== X-Google-Smtp-Source: AGHT+IF60aIq6g3ucR22Aj186cG0sgQWUw5a0745tee7wa1iYIqoMu92Q85doUJBFw4MTB1bV8Qe X-Received: by 2002:a05:620a:4686:b0:78f:ecb:541d with SMTP id bq6-20020a05620a468600b0078f0ecb541dmr2762337qkb.42.1714127524145; Fri, 26 Apr 2024 03:32:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714127524; cv=pass; d=google.com; s=arc-20160816; b=vNOCmlbSxXKpVj8FDFX7w5l/R8cO7LFOOgnp62H4rlkFRt2pBG4XY5IRCMSGV6WAUQ zGtsm8n7ID3hrVu+JBX1nDEj8BvoWEQ3+Iyl6lFsmCceB90C0nq2ofCuq/d91OcTlSsE P5WMP8JHEsBHvLnhfgB8srWag/zmB/L5pp3CzTSmPdbl0asxvoNYjcAcQzcBAx27AUPv gX46+1B8355m+e7d86lfiETR2FDrY/UWhlfrFhOFQnqZEBzI8U80qyrPZcMR5MiyNl32 oyhgOXUg1t1MkZZwwBCC3h4WJdud+bVbdIdpxfHGkyQYM3xuWSk0w9scflnE1jPowQA9 pb5Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=i1qPHaYJsXVnpN1q1kxqxqovQFoKLf298/7BG0g6m8k=; fh=+guvHrSxd0kfh2IrZtzdNdkw4UEpYdtD8CtXMbzJ1yE=; b=D+ZsQBnMoN92MSPz2/6Hmt70utVESgeNZs3S/GKnjECvQZUsPHMh0CrCHXkjXvGq0z QVYx4pWeNRJNOU3a1a/LZ7xd5Fq67JmjMuHrQmBhE+b7Qy7v3WgkmJEvutb9DzUt0uMQ zzPyEEd0u2F5JMo+2cjBLm/9KMbqxuKAcGuSc2dB6cGCtrshDZl3EPOqvsrZqg6tGACj t1LncyTmzKE3DQBJzw6nEyaUsP/PTFrakofIV52+fHSuWc6xUh7/Qhk223JR0TQxpaxO 1ImWj32mnhrqDzCa1AxN4SRwpCELIvBT19HQ0jUiymQ/BpiDfDefz0Jf0C+bwgXbVOkx 4BHw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tVssEkSN; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-159873-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-159873-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id j12-20020a05620a146c00b0078ef13f0e9bsi19753244qkl.23.2024.04.26.03.32.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Apr 2024 03:32:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-159873-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tVssEkSN; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-159873-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-159873-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id E55201C2100F for ; Fri, 26 Apr 2024 10:31:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C13B21422C6; Fri, 26 Apr 2024 10:31:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="tVssEkSN" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E47E15A109; Fri, 26 Apr 2024 10:31:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714127482; cv=none; b=GnHEhEDQ/Up0Qu3OU+9dgqFRRtcw7X7bQoFKsBciFMcQrwq/ZdKy/Ivzwj/FKukpT3WJg8f2/pQY9dOStMJt6kCfcR0tJLGz9S2WmoHUh24c1fXBS7/S55jPnvOCTZFd5yQLXE1+G/Sv1+PXzqOpHkgLWx1oHf0KCJBiLUOm2Sc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714127482; c=relaxed/simple; bh=M9Mk/1LclGdhJWimwogrI2nrrKOT8uLmGIKZSCfYvHI=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=odKfZT/9plY1qjaTWuGKjYfXGoKPjkMGqGFrtsD1OSDBfZP2BS5yY67zJwxJHhWG9ObBEBFIc8k8gZLLTV/Yf+IQ+P0ERUFbr1FlLgY6+W8m+8q91sQOV0UxQ2B1cwC1R7BPSeU6GWkAHM+D25jc+Q2gjHC9AChg0q4SE/45uKU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=tVssEkSN; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id C935DC113CD; Fri, 26 Apr 2024 10:31:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714127481; bh=M9Mk/1LclGdhJWimwogrI2nrrKOT8uLmGIKZSCfYvHI=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=tVssEkSN4mreZLlloFd3oP+7+VkHU/QrDtXMKyNrGD3oLEEbH5Yyd01l6r23qCcAl 0aR+A6vh60gnuc9y0Is43qFML3eigsJL92H5eLrl4tlTtEKWAIwq/3eF8hXeHOkalC Kd2SG+J5Lc+VFqd0qJHGBP0TN9Ewb4y9GXSAY1FWvAJzwUteJe7+n13KeNsubfIGyu MIjvMT2g+6VWvayx4EZ1RE+fYF04LG62wtMQv2g+njP7XWH2IXmkPOwiM0l+8FqJPN mfhddeFoMtzhL/t8Pr2xAfZCtSrmd23fRd3splmKAZxu5qCKqXXAtC1rZ/uyYKPfLC ypv2zWsYIqTvw== From: =?utf-8?B?QmrDtnJuIFTDtnBlbA==?= To: Jiri Olsa , Arnaldo Carvalho de Melo , Jean-Philippe Brucker Cc: 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, Jiri Olsa Subject: Re: [PATCH v2] tools/build: Add clang cross-compilation flags to feature detection In-Reply-To: References: <20231102103252.247147-1-bjorn@kernel.org> Date: Fri, 26 Apr 2024 12:31:17 +0200 Message-ID: <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-Transfer-Encoding: quoted-printable Jiri Olsa writes: > On Thu, Nov 02, 2023 at 11:32:52AM +0100, Bj=C3=B6rn T=C3=B6pel wrote: >> From: Bj=C3=B6rn T=C3=B6pel >>=20 >> When a tool cross-build has LLVM=3D1 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. >>=20 >> E.g, triggering a cross-build of bpftool: >>=20 >> cd tools/bpf/bpftool >> make ARCH=3Driscv CROSS_COMPILE=3Driscv64-linux-gnu- LLVM=3D1 >>=20 >> would report the host's, and not the target's features. >>=20 >> Correct the issue by passing the CLANG_CROSS_FLAGS variable to the >> feature detection makefile. >>=20 >> Fixes: cebdb7374577 ("tools: Help cross-building with clang") >> Signed-off-by: Bj=C3=B6rn T=C3=B6pel > > 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. Cheers, Bj=C3=B6rn