Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp3583067pxp; Tue, 8 Mar 2022 18:03:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJySnENxrtM0AD8Sm3sLmwJYZNg4go42izBTK2CG/fYQanlWkVbHp8sgZucxTumgV4kv+GEj X-Received: by 2002:a17:90a:a418:b0:1bf:2e8f:f0f5 with SMTP id y24-20020a17090aa41800b001bf2e8ff0f5mr7768740pjp.59.1646791419754; Tue, 08 Mar 2022 18:03:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646791419; cv=none; d=google.com; s=arc-20160816; b=w+veOuhifUWiBs5Un9R1nKUQLsuU3pAHNgU8TACJWgmvm7P8BblXDE66QE5d86BwCH vnDjJHN8OhFocSjsSUmKnjXW5bn9R5JPBwq525Hmr19ZaMhr4t/ndq6v/6JpQq5r9/ca jeFgxnLotdo8uFsvqX53n8MPnVffS1OfIcPFY1r9Ay5Sh8XfWJ+QSZeyqx+e6pQkcbdD lhp0qhA70AejElu92SMHgzNJVE5hP2ygCSpJlQDojVOiXgduSmnna0C8LXFBCiOWPNjw XEY3iYXbcYQPamNrbPuxB5WADRjMG4NYxIIyeNi/J4n9lx8BwC29ihrsigrJDoiCeC05 8Vqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=Lg8xgBI6gakAZaZAeGNKdmSCqZy5bBNxTys/0/+weWE=; b=hW8KJpdu66gZXSxHPWl1GWyiSTZMHrd6cOq/UcdhNXkx5jwkJ1LctSI8f9njsLRZFX 5zAGWevb5Dn656sjp5MfG4BVXpPZt/wdLSThD1+PoQwin2zyIyY+GjIriP9tFDgjpJw+ /DVrCm6W/288H7ZuS9ZPyWK0/Gm+0ZYy2RVOeZ7tIlbo+1YLHApELa3ZrONVxevCAxLm 36E1mC0WbZGcsGIFzaVl/1t6xaEZYZ8ntq3xgIEyjfA8DyG1tS+BkF3QnJm4oHap0nJd LndZG1nAaQ/AGEZaT0YRgAHfQ30PyCl7NJOZHBuMj8IFnxdWRm6JwLKJXLQtZZkMXeLf PqLw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id v15-20020a63d54f000000b003743afcc189si533929pgi.85.2022.03.08.18.03.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Mar 2022 18:03:39 -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; 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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 338BB1168E4; Tue, 8 Mar 2022 16:36:24 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348722AbiCHRSu (ORCPT + 99 others); Tue, 8 Mar 2022 12:18:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48348 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348720AbiCHRSr (ORCPT ); Tue, 8 Mar 2022 12:18:47 -0500 Received: from www62.your-server.de (www62.your-server.de [213.133.104.62]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 23D2F17045; Tue, 8 Mar 2022 09:17:51 -0800 (PST) Received: from sslproxy05.your-server.de ([78.46.172.2]) by www62.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92.3) (envelope-from ) id 1nRdSz-0009WI-7E; Tue, 08 Mar 2022 18:17:45 +0100 Received: from [85.1.206.226] (helo=linux.home) by sslproxy05.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nRdSy-000FXQ-Ux; Tue, 08 Mar 2022 18:17:44 +0100 Subject: Re: [PATCH bpf v2] tools: fix unavoidable GCC call in Clang builds To: Adrian Ratiu , 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 References: <20220308121428.81735-1-adrian.ratiu@collabora.com> From: Daniel Borkmann Message-ID: <6e82ffbb-ebc8-30e8-2326-95712578ee07@iogearbox.net> Date: Tue, 8 Mar 2022 18:17:44 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <20220308121428.81735-1-adrian.ratiu@collabora.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Authenticated-Sender: daniel@iogearbox.net X-Virus-Scanned: Clear (ClamAV 0.103.5/26475/Tue Mar 8 10:31:43 2022) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE 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 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? Thanks, Daniel [0] https://lore.kernel.org/lkml/87czjk4osi.fsf@ryzen9.i-did-not-set--mail-host-address--so-tickle-me/