Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp361731pxb; Wed, 14 Apr 2021 17:52:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxlOmkxDAcD5DW03AUNmK6XWJE9g+Wv/ztbEbLzfYDZS34xTgAV9wqrniTOdp5bP1DMqKyx X-Received: by 2002:a62:e50f:0:b029:214:8e4a:ae46 with SMTP id n15-20020a62e50f0000b02902148e4aae46mr722082pff.73.1618447955718; Wed, 14 Apr 2021 17:52:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618447955; cv=none; d=google.com; s=arc-20160816; b=i1rnsCvOpf/a54+dAuwVIjmNmUP09Sa5AS8IuicndzAGDXPWGd0xXUpRgg8t/XqfVV jRHs6xR0+SCPkP75CN+Be+/i2FLCM3cMVsv/bs+hzWxx5ws5n/UOZL+d22FiR5duTRIC PuYMmh81usdTGIbmI812KC8UeK4BbCp7aJuLjyRVOe9Yey0mRsoYU6DsxuKumXj4ypuj ix+ACBFzorxapGwMwDhaLAM7+xAmG2a0g4Sa4L6Meati9IBLkqk+2IIlA3d/sq5CGzDK 7XH+l2QR8H0L3i+5/xf7ykowwxDNrVSfNjwUPd806nJisiUr5m0lHF4GSP4m9HVafh3u qB6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=MllpCSIPMGfCbWa4NZxlMqGZ/D3zjxnnOzGw5yr7J00=; b=yw2PggcTvulBRIIdnfuqTAsmgyoCN6zSruRweSu71JqU8jNnZ3I1d1Ad6cv2MqiQoO GZXuUUzesVM7uVMZizcfcdnAk7gqitDbMhhurysGC/9g8qjoxUdApNGbpD1Cq+FKTRvz +S3Fszf11xJVq9S+N0tCSfRULic4qMghkAZLtjSTBHCNG7Fr4FwjnLsNlqeDSUQ7bK4z UugAWW2OmBDgSQU6AYQcA/MKXFr4LVd3Ly9kOFacNOTlrrGN0IHx64dvSoGyORXzt7RV 0k8KpnpIA8NEvxa/yhVtIQqd3AKtN670ycO00wKKYxCtPNX+9xzl3VL9w/2pmRB4Cv+6 cBwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=rnlshmz0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id me18si1166005pjb.147.2021.04.14.17.52.16; Wed, 14 Apr 2021 17:52:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=rnlshmz0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229821AbhDOAs3 (ORCPT + 99 others); Wed, 14 Apr 2021 20:48:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56368 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229458AbhDOAs1 (ORCPT ); Wed, 14 Apr 2021 20:48:27 -0400 Received: from mail-yb1-xb2f.google.com (mail-yb1-xb2f.google.com [IPv6:2607:f8b0:4864:20::b2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7EEDFC061574; Wed, 14 Apr 2021 17:48:03 -0700 (PDT) Received: by mail-yb1-xb2f.google.com with SMTP id c195so24214355ybf.9; Wed, 14 Apr 2021 17:48:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=MllpCSIPMGfCbWa4NZxlMqGZ/D3zjxnnOzGw5yr7J00=; b=rnlshmz0m5uO0F1y596lEBhYgquF6kLp205P3AdzdDicA8uoNpWprlOsqd5meqbQ0F 5RVT7lQQLJe7qCPVUWsztBXCTm2ErU2/oUWlQLxbsG79Q+jycEMAU4CovGt3usIOizn+ j8QbynvRYejfKT1mKclK8PnURuxPe2HUctQecr2afgwyCQ4FGIFhBBDnzRW2FvF9ePTO h+Y4PGU4IoRnUg/l7hniNi7NE0ettMzQ7q1kBs+1kA6W1JyGU0+Vge8fU08nh+j+4bkp m5nWYJUYQFj23rrfKReqNGBCjnwgvueurmjFJn4etT41dSnVBm6f/cIEqgqhvrKf6PHw 8grQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=MllpCSIPMGfCbWa4NZxlMqGZ/D3zjxnnOzGw5yr7J00=; b=T4NTcVKslgAZiiaqsuWo5txzk+IW/QMoRj998410x+vKgmo4vcLhJ/4C1h6CDqyVbJ nVBS91+D477jLkOl8AQNReV52cm33Uo14LlwFa1XUmA3wvPVkib9INHipz9oyAeI2DeZ 8simxNTFcF5uUN3Fb2jOEiKetPpL6kNa4F6IhfuZkl8qMTaXTQEtS0nur24jcbhaJbWe 3L/JYm1RweAvm0H2s1LuUCToOxhaWTm9CJ7oyUTvBRtZUmIqP/d2H19sG5pJOsAiUS8e F5doSUunx9f5xOLI5n70V/A3DRs/s4sIEw8n1FLIwV0q4HI32UTTVwMmWigFKMTc++vN ph3w== X-Gm-Message-State: AOAM531f5cynxY0sVR28fTDM+RneCyVJSit+3HJhDnmBokPcunNACWjb yLN+DmYTgsjnvnT2oOCWqLv3K5x/lh/L9kpgWEc= X-Received: by 2002:a25:b781:: with SMTP id n1mr971106ybh.115.1618447682909; Wed, 14 Apr 2021 17:48:02 -0700 (PDT) MIME-Version: 1.0 References: <20210414184604.23473-1-ojeda@kernel.org> <20210414184604.23473-4-ojeda@kernel.org> In-Reply-To: From: Miguel Ojeda Date: Thu, 15 Apr 2021 02:47:51 +0200 Message-ID: Subject: Re: [PATCH 03/13] Makefile: Generate CLANG_FLAGS even in GCC builds To: Nick Desaulniers Cc: Miguel Ojeda , Linus Torvalds , Greg Kroah-Hartman , rust-for-linux@vger.kernel.org, Linux Kbuild mailing list , Linux Doc Mailing List , LKML , Alex Gaynor , Geoffrey Thomas , Finn Behrens , Adam Bratschi-Kaye , Wedson Almeida Filho Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 15, 2021 at 1:47 AM Nick Desaulniers wrote: > > I'm ok with this approach, but I'm curious: > If the user made a copy of the CLANG_FLAGS variable and modified its > copy, would TENTATIVE_CLANG_FLAGS even be necessary? IIUC, > TENTATIVE_CLANG_FLAGS is used to filter out certain flags before > passing them to bindgen? > > Or, I'm curious whether you even need to rename this variable (or > create a new variable) at all? Might make for a shorter diff if you > just keep the existing identifier (CLANG_FLAGS), but create them > unconditionally (at least not conditional on CC=clang). This is only for the GCC builds -- and yeah, it is a hack. I still need to think a bit more how to do this better; although ultimately the proper solution is to have `bindgen` use GCC like it does with `libclang` and avoid this altogether. That way we can ensure the bindings are correct, support plugins, etc. Cheers, Miguel