From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 48781C433ED for ; Thu, 15 Apr 2021 00:48:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1CF4761139 for ; Thu, 15 Apr 2021 00:48:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229463AbhDOAsb (ORCPT ); Wed, 14 Apr 2021 20:48:31 -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-Google-Smtp-Source: ABdhPJyFnt/9OejzItdMJY3l1hqEaYduiYaS/FBnAk5Q+XVduQ29yG/Y19SvcLZMhCf/aky519Hvhg8+8PpGUf8rVec= 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