Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp3529655pxp; Tue, 8 Mar 2022 16:43:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJy7MRi7SgXsZQ5/RGou7A2JmN0Gv0wGFIcmT8s7kOXWjfYqULZskxP7ppRlx9sPXzVzxGS6 X-Received: by 2002:a17:902:714b:b0:151:d8fa:fd98 with SMTP id u11-20020a170902714b00b00151d8fafd98mr17687278plm.146.1646786617399; Tue, 08 Mar 2022 16:43:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646786617; cv=none; d=google.com; s=arc-20160816; b=epC/z3K6ODuCYUugoFeUeDkCxlFVeuZO7/ojx3iuH7AntbdDGcxG7L6CQQt6Adr18R aI44aduH9BaCGZC3ByepiEZ0Jv1q0XhSNJ0rwz6mwmtoi9QnUQDV4cABGYZg59AoNZTS Uw0WWpwhzP/EDiBA7Y2paeXPlPR7mAafZJC3jWgViIdkvXI6es5EuY2xvmkzccDI/Boy FXjsFxSc6fqG37c1udDfHqCH2N6WdQxzHU0oATxjyq+ZW0+Kqu0J7F1PV2u32QEovVI4 +IxGGFMGF5ZEawUZZpXpCo2cP9KkyqOEF73FJgKgodr3YglO3o5udZ9sNG2DW7FTM0C5 uhXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=lX1hny0XqfdHut7VTY/HqoqLG52H2ptP9MQZCpypsn4=; b=KPWzEnElmPxNZegI32zvPu/3xT4L1Go7EkAMUnaTEeyjJN+Zs8Y5Gs6TuhSUrA4w7I Vq+rNsOdVEJAUHvq/sI3F79IyTxY4e4hN8azX3l4GiXyRB8HrsANA94JvrcE7CA3+5zf pMDLHxoBBXEcwZ9d6+A8K1lWcfieJMsFOZlQ6X202Z/lGmDKJC6mNG5d5Ol4mcjF5T3H 5l2jlPpfBsVwNy85MROLGed39JM+ukAMByAbBeAGea6g8Xk7H8gxLB+aSO4ntWm8y41/ w5GZ7BzkRKQuft4ZP+QM2MDA1E/y3iVU25KeeiCDn2K2EjP9IH+J+Fev29TXTyKbK9a+ M7sw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=DjssUUiC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id 8-20020a056a00072800b004bde2486f76si376248pfm.146.2022.03.08.16.43.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Mar 2022 16:43:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=DjssUUiC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id EF05212F433; Tue, 8 Mar 2022 15:58:20 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350632AbiCHWPJ (ORCPT + 99 others); Tue, 8 Mar 2022 17:15:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50348 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345557AbiCHWPI (ORCPT ); Tue, 8 Mar 2022 17:15:08 -0500 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 50FEF4C43C; Tue, 8 Mar 2022 14:14:11 -0800 (PST) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: aratiu) with ESMTPSA id 769851F44332 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1646777649; bh=oH9umuyNaE5/U4zhMjdsDxOXvye3XmzP5z4EoQRHZWk=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=DjssUUiC8YUIrd9O+MeyiYKjRux86b4SDaOCG60RS5oPKGznX7Q8bA+NxxisCugxY TJNghTwbXGz4K5GcOuufZX+w0KFjzm4O4/3E4WckLww/C2gZiF0uO4w/k2gOOlBUrz ibMLHh6s1evlK46ar22OEjUsNN6VY8eF55GH0tu/7bT5p1L0qbd1564PBQEnkSA9fx W+7FJkIhc1BlcO3T9kxQr1zGUvieubbQO0PiotBzNWFtcEtULDWxMuvAzmrUSnHGBj NLWlRUa1erDiqJS46MGYexhaBwXGT8Q8BNubpSwENaWjSHVzlz2qLtOEgxa4M5taEr Z3ReoAe7OhMlw== From: Adrian Ratiu To: Daniel Borkmann , netdev@vger.kernel.org Cc: llvm@lists.linux.dev, kernel@collabora.com, linux-kernel@vger.kernel.org, Nick Desaulniers , Manoj Gupta , Nathan Chancellor , bpf@vger.kernel.org Subject: Re: [PATCH bpf v2] tools: fix unavoidable GCC call in Clang builds In-Reply-To: <6e82ffbb-ebc8-30e8-2326-95712578ee07@iogearbox.net> References: <20220308121428.81735-1-adrian.ratiu@collabora.com> <6e82ffbb-ebc8-30e8-2326-95712578ee07@iogearbox.net> Date: Wed, 09 Mar 2022 00:14:06 +0200 Message-ID: <87fsnsrt1t.fsf@ryzen9.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY autolearn=no 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 Hello Daniel, 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. Thanks, Adrian > Thanks, > Daniel > > [0] https://lore.kernel.org/lkml/87czjk4osi.fsf@ryzen9.i-did-not-set--mail-host-address--so-tickle-me/