Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp1411761lqm; Thu, 2 May 2024 14:07:19 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW/hralrncObH7VOYQMRkzhJjx4WsZ++6JPTF8R9xY5M0PeiPYl5bThHP+zMSZQB6LPILtk4PIOgtIGO1sAEypAasggwcnFaP7GUuYkKg== X-Google-Smtp-Source: AGHT+IGqU3kHANamd42IoVlhzWS0w0JFG6zvOZWoNbPT+LPblSFQaJn21C3E5M9rWbuaFjU66I7+ X-Received: by 2002:ac8:5713:0:b0:43a:ed55:f3a9 with SMTP id 19-20020ac85713000000b0043aed55f3a9mr858326qtw.30.1714684039380; Thu, 02 May 2024 14:07:19 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714684039; cv=pass; d=google.com; s=arc-20160816; b=IIvL1Lixk8jCTscUSBlK+MCXBZ1naHb0OX95dZgLALr76IqDvKsy7LSzhp0ClTwyBd 8wypFfnoBU2a1d2uIYiKIOLRhNYsmIPQmTLqwVXbSY5SsU2DyQSEqifm2P7wwqLgzlpz 1YIpUMutfrcTK1CvUHU9bQPIUNM3zFfuZLln4GUwCWZtchlAdWwo2hi2HBKZHaDheOaD s70nOdC3fQHl30nWNOBIYED5k7Mt/fM6x/HIqlPUoUhLc5ldZToBsdoiJ/JYOYi5Hyzp ClaUOq/7b5Qig+ZPDhO3S2/bWa27bWKLnfl5dBDHffnmPIXTNlBbQr6HFxt/ol2BkgTn uQuA== 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=/jHabbQqOb+lGcJReIrfR5QlcZjkQQEEzs4OS0Vzj1c=; fh=Qkxbj8qGG6kj5gJUEUDccArxL4G0GEqMcPptkNm/zJo=; b=wyR95MK8erbbHJvuBeUFUXD9d0KIbNyzUHGWmiZSWbLW6LdsQzv7Cybcl14VGtzJcX t1wTbAULJYAzqSgw7HQpCg44BIqAy++Iql/1YGRv1Q/p6u14AdQRPx/Q+3aT/pcT0j0c 42QwH8s17JEF6/6NmDyo7JRzqMd4t0Hwfm78OwRrvXqxMJcJz7OJj1OnHBXjL9zoj5LJ qEZmRhcY58GIaPHAraXcOioABXs9/4cgrmciCFOD8ie/EIv7+/hFVv6xwP2aRfV4cHkY UysNWLyNS5R+0raYr+XtrTBMojugJFveY68aEw6gJcb+lEqP4hGl5KuflHUNCgwnpapM IQmw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=n0wb9iAw; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-166911-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-166911-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. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id u6-20020a05622a010600b0043ad4478054si1864134qtw.269.2024.05.02.14.07.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 May 2024 14:07:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-166911-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=n0wb9iAw; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-166911-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-166911-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 1ED681C20D8E for ; Thu, 2 May 2024 21:07:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9D030181BB2; Thu, 2 May 2024 21:07:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="n0wb9iAw" 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 BC6111E86E; Thu, 2 May 2024 21:07:04 +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=1714684024; cv=none; b=GO5MRSdpFBt0zntbx+xn135FuxGJp9pZ/zf2Vgv/xHID35VaumKk9r5hQJEt5/abDMUv5Do87DaXlAIqpgWOJDTStmibR+plxcyPbHnjjGGrz9Q6QBB7jCFzFjhd/ZwAgqJcN/VlI85SIiuj9fL/1AxHBP0njqmFWMCZrSlFrsU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714684024; c=relaxed/simple; bh=rjkBg6gUkSwRf+TgXtxDgQ2t24FzbYZEekev+R+BxDc=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=kfyqGm04PHbjTSHZC+EFbtUcflQHMSzwCafKm9YJagKTwRJxholsXtGMHR3K3+e/D23OU29je2S6sTyfd+Vt+NBMtaj4kvtSBoDV0/DuoWOQe8/D/x9a7XNMNa2OtX9tkKvjJD22vuGPQnlD7y53yUS3txk+C6lncE5wbHQAgt4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=n0wb9iAw; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id CA89AC113CC; Thu, 2 May 2024 21:07:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714684024; bh=rjkBg6gUkSwRf+TgXtxDgQ2t24FzbYZEekev+R+BxDc=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=n0wb9iAwpK+XMfBr/FZ4U1DKg5YoFOUoEbTr63KIe4K4V+uV6oWvbzrQeqtP8mSLh s3O6FRJAbtGMRyRod3rcECmmp3rO6SqFd8q8E6UaVdDJp0ja8BbIgEv/Ez0ACEerK3 UrrSf4hRJJ0VkcmpFz/wcBuibPdGxH1LsFVUpvrtl/u+3Zhfl1aeRppuaFGsEAEgHM YgvazFudIx7K3DphZr4E3iYSTULNJ0dSbBbgmUch4hdUz4V5jsL5r1u0AOqq4mZNOx xrejkiKoOu4hN56yYrWy6wA+L+f3RCUfyuOOFUErA7DkJkhGYX5+mB+r6BJzvnDruY ybI1OvPKH2fkQ== From: =?utf-8?B?QmrDtnJuIFTDtnBlbA==?= To: Jean-Philippe Brucker Cc: Jiri Olsa , Arnaldo Carvalho de Melo , linux-kernel@vger.kernel.org, =?utf-8?B?QmrDtnJuIFQ=?= =?utf-8?B?w7ZwZWw=?= , 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 In-Reply-To: <20240429171145.GA241057@myrica> References: <20231102103252.247147-1-bjorn@kernel.org> <87o79wxvnu.fsf@all.your.base.are.belong.to.us> <20240429171145.GA241057@myrica> Date: Thu, 02 May 2024 23:07:01 +0200 Message-ID: <87a5l7x6ru.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 Jean-Philippe Brucker writes: > On Fri, Apr 26, 2024 at 12:31:17PM +0200, Bj=C3=B6rn T=C3=B6pel wrote: >> Jiri Olsa writes: >>=20 >> > 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 >>=20 >> Waking up the dead! >>=20 >> 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 Thanks for the review. Yes, maybe it's a orphan files issue! It does seem a bit weird to route it via BPF, since it's just a regular cross-build fix -- Not directly related to BPF. Regardless; I'll do a respin targetted at *some* tree. ;-) Bj=C3=B6rn