Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp4886235pxv; Tue, 20 Jul 2021 13:43:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzT3RAFirpvEwX/WbEh84TeXBUAAMYwBTWPaNXB5eZ6M4lXYL8P2kMStuo8W4C4RjPg4wuk X-Received: by 2002:a17:906:d20a:: with SMTP id w10mr24573285ejz.426.1626813831745; Tue, 20 Jul 2021 13:43:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626813831; cv=none; d=google.com; s=arc-20160816; b=yz1Sa+nlZduVfFgl0PC9kCa7LNtx5qg377lk4h2h6TdTqUe6zELmdtE8nxnMIYSRn4 u0pDCDk1gWU2h3T1JxH49QSGRj1e7lYFEJRzp32Gr0gRf6lMGQEf3nfqmi1+J80ljJXS bqtnpcFZkGp3O05tnJVwZk7oJy2sd0l368PgveKbZv1IWVJSqboZYGcUNloRt4ajlRW0 +4+hkWkQecPczaG1Hw9SSo76un3QP2wb8KiU2vJvOPH/jxkrXjCA+dPauB461QskdQIb YOs5b5bBUfvbu8oaE1tPoTmga6ibdDFnDfzEDTTgoMqgAx7n4OispfvQtUv/W1Y+qaLI V6eA== 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=A9yhnAOKnkpaIpXwQ4S44wQp2Z5wbSnHNxsdlMsfhZg=; b=mC4YbCBufpQaHDrVIcirX43bZnYkJhbQp9bav7UgAzKftBMe/lDyGTku4fSI3fv1iF Fwk+dyT2t9ScrPqKojU5oiqZB52dAWH/ADXEPpLr4ErLtqB51IvGv3EMe+Dd+kfjU1Gk mTVhe8UfJkRRl0Yh0FXCS+66tqvBOBCAhFsQWkhgNUtW9rOFoXwnPgurMSAXdpH7EkWb gQJ8QU+Nx8NBugRfvZbeEC1huqadiAJ7qsCAtzUPIViBdR18VWF/t2/G6w0oG2JD4cMw 66QVVlMQXAmvNYS7C99LyL3h5oZTLN+Sqvx1E+ms7eHDsXs/DVk9OT+BBooTN3mwshS4 n5rA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=AkPrJswL; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e12si24300585ejh.74.2021.07.20.13.43.27; Tue, 20 Jul 2021 13:43:51 -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=@google.com header.s=20161025 header.b=AkPrJswL; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233300AbhGTUAO (ORCPT + 99 others); Tue, 20 Jul 2021 16:00:14 -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-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