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=-13.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_IN_DEF_DKIM_WL 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 11097C07E9B for ; Tue, 20 Jul 2021 20:42:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id ED63560FF3 for ; Tue, 20 Jul 2021 20:42:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234156AbhGTUBE (ORCPT ); Tue, 20 Jul 2021 16:01:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37072 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235104AbhGTThj (ORCPT ); Tue, 20 Jul 2021 15:37:39 -0400 Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 079F6C061574 for ; Tue, 20 Jul 2021 13:18:15 -0700 (PDT) Received: by mail-lf1-x133.google.com with SMTP id y42so37667630lfa.3 for ; Tue, 20 Jul 2021 13:18:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=A9yhnAOKnkpaIpXwQ4S44wQp2Z5wbSnHNxsdlMsfhZg=; b=AkPrJswLeZIna9xYH5/IZ7Y2Iixa+rSYTNzJ/f5zTdwVI5FoEcHarhzMeDCDwwAJOW cuFEzaqi6+MLh3aA8xCnACXzvsvlp3dU9g7J7rkKGBk4ksNd/76c/JRmSBSQLN7KHraZ aRoyqHGje3w6i2EySEFAhaMdNo8zJPYjziyj7wTIWFSNgsiCN6oihCzLg6Azc0t3hAJN bvnOIDX+koQ3nH4EQBRYv/uZfoVyF55xpz7J46jejt5xzdYF3i3c41lePR9gPDYyzfKz afnkxLZBeA0bifxPzLD0QpyTpfyQEleZdUrcAXl3xT7YjkJId6anWJs67J+SOmYMCRbA HlTw== 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=A9yhnAOKnkpaIpXwQ4S44wQp2Z5wbSnHNxsdlMsfhZg=; b=Wd8GqWH3rocTEgwSdNqZY+a2oUBTkD3jev12kX4PvdXV2qmVsWL9HLfGNj1NJsn/Yy BgOU/qPitRuJnFDYX5ZkxS39LIlwLfB2eqXZcVRpRKBBuOWBROTnxViLfBjQSWmtkEFn qasKcmz+hFXTzOClQvxeXgZ1dbfXOU1pbidHUh3wnZqp61e109p8YpCyFZyYN7VjP/zl JeKs6zf6XCOluS653jn6XJATBjshFNrtOeF+RK4BqlGOUdi7pto03MlH41j7qTCXLDiA g0Hx97TaZWOCezKWltCnbjart/XG9Zq8DjD3ErznCaaPvquDslY8VQnXH4uaclKdZuZo 3a4w== X-Gm-Message-State: AOAM532Y6jbQIM2J9skCf0dBpopY6kpSRBDpUQ2dx6VVFKVrRIyoecEP 9Ek5TIWGlGRMMLwek3Id/1k9p0N2Ew6UyCHBNE69doL91ZI= X-Google-Smtp-Source: ABdhPJySetWCDgaJU6+K2rRIahVT3YVfnnSgHpEEMLcXaFJUGdU2bQU2g+SNnqYrUYICdy5652MEKxCSG6bUd/MJ2i4= X-Received: by 2002:ac2:59db:: with SMTP id x27mr23163928lfn.547.1626812292943; Tue, 20 Jul 2021 13:18:12 -0700 (PDT) MIME-Version: 1.0 References: <20210708232522.3118208-1-ndesaulniers@google.com> <20210708232522.3118208-3-ndesaulniers@google.com> In-Reply-To: From: Nick Desaulniers Date: Tue, 20 Jul 2021 13:18:02 -0700 Message-ID: Subject: Re: [PATCH v2 2/2] Makefile: infer CROSS_COMPILE from SRCARCH for LLVM=1 LLVM_IAS=1 To: Arnd Bergmann Cc: Linus Torvalds , Masahiro Yamada , Miguel Ojeda , Fangrui Song , Michal Marek , Linux Kernel Mailing List , Linux Kbuild mailing list , clang-built-linux , Geert Uytterhoeven , Christoph Hellwig , Nathan Chancellor Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 20, 2021 at 12:58 PM Arnd Bergmann wrote: > > On Tue, Jul 20, 2021 at 7:43 PM Linus Torvalds > wrote: > > On Tue, Jul 20, 2021 at 1:05 AM Masahiro Yamada wrote: > > > > We do most of the other heavy lifting in this area in Kconfig anyway, > > why not add that compiler choice? > > > > Obviously it would be gated by the tests to see which compilers are > > _installed_ (and that they are valid versions), so that it doesn't ask > > stupid things ("do you want gcc or clang" when only one of them is > > installed and/or viable). > > I don't see a good way of making Kconfig options both select the > compiler and defining variables based on the compiler, since that > would mean teaching Kconfig about re-evaluating all compiler > dependent settings whenever the first option changes. Right, there are many Kconfigs that are predicated on knowing whether the user is building with gcc vs clang. We probably could note the users preference in Kconfig, but we would need to guarantee that we evaluate that ASAP and before most other Kconfigs were checked. -- Thanks, ~Nick Desaulniers