[lkml]   [2022]   [Mar]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH bpf v2] tools: fix unavoidable GCC call in Clang builds
On 3/8/22 11:14 PM, Adrian Ratiu wrote:
> On Tue, 08 Mar 2022, Daniel Borkmann <> wrote:
>> On 3/8/22 1:14 PM, Adrian Ratiu wrote:
>>> In ChromeOS and Gentoo we catch any unwanted mixed Clang/LLVM and GCC/binutils usage via toolchain wrappers which fail builds.  This has revealed that GCC is called unconditionally in Clang configured builds to populate GCC_TOOLCHAIN_DIR. Allow the user to override CLANG_CROSS_FLAGS to avoid the GCC call - in our case we set the var directly in the ebuild recipe.   In theory Clang could be able to autodetect these settings so this logic could be removed entirely, but in practice as the commit cebdb7374577 ("tools: Help cross-building with clang") mentions, this does not always work, so giving distributions more control to specify their flags & sysroot is beneficial.   Suggested-by: Manoj Gupta <> Suggested-by: Nathan Chancellor <> Acked-by: Nathan Chancellor <> Signed-off-by: Adrian Ratiu <> --- Changes in v2:    * Replaced variable override GCC_TOOLCHAIN_DIR ->    CLANG_CROSS_FLAGS
>> As I understand it from [0] and given we're late in the cycle, this is targeted for bpf-next not bpf, right?
> Yes, let's target this for bpf-next. The issue was introduced in the 5.17 cycle but indeed it's late. I can do a stable backport to 5.17 after it releases.

Ok, sgtm. Given it has an Ack by Nathan, I've pushed it to bpf-next.

Thanks everyone,
 \ /
  Last update: 2022-03-08 23:43    [W:0.056 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site