Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp3228887pxt; Mon, 9 Aug 2021 21:20:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxQ+2M7mhjKhyEBxgm7hdC1qGDr1qwdbX8gLgT1S/A8O+itmx1e7iAZrfZ7arP6mBgr3MuI X-Received: by 2002:a05:6402:2749:: with SMTP id z9mr2413093edd.58.1628569226196; Mon, 09 Aug 2021 21:20:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628569226; cv=none; d=google.com; s=arc-20160816; b=FX+r6mka2q7DMfMTV0ddb3GbYtsVJ8YROHWzacrGtztMhWSERb4mF4x2Yq/+owcqUr n8wb3Ow8xr+zKqTcDQWznMl8y/UvIzV6CInNIE2G80KWqUNJLjASAQPmxBdCned9+3yK Pw+e65BwnjkAzx9NIdzD3fIk6z3HPxQEYmMqJJNhyYX+1cF6OmYu+8b5GRCIhtlFv8Ln 3npQo4bq7P6t74fMaMMtIASj8W/QaWd9+HM99F0lS0jReB5McDx1fdgO2IrYEOviZDib 0yXmZYv87HgRzSnCEd2MHFAGhepLcSp2Po8glDJ4WoRNF4aJKM8atyuI1dInOUFTNscY DoyA== 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:dkim-filter; bh=xHNISeRMlTiEcgni+JyLJx7pYa/VEYClQ3P0qFmQuz8=; b=Y3fEiG2m1EbAD/Kdd3TuER9mRhyxxtL3gstVA++tzb2jHOCNzM+8LQeGFfx8lKUJ/2 jX49S9IlC/sl26UaWmoCJeTvPLDFeBpzy6ey94ekPnAE1os77uNb9QolrCju6FO0Islj sCAJm05A/vHaotjfVo21PRKqHxZVv4PyB6HQ/n+OXx3RD8JqP5q9Wa/7XMyMIDBKSPpn v4wVQxO0fBdJR0l681026zAyI3Qn7hcHneLzZrhYpAGXrv0anGH5d7GkYI9KJFcKJz8F fFYm0BZaHfGpoQb1CWnZ+bUPA/tmHasI8WpBXa3jf37wldIFCDlRg5Ows+ssoPiZMXLh sWhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=iFsLPq8W; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gf9si20064253ejb.635.2021.08.09.21.20.00; Mon, 09 Aug 2021 21:20:26 -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=@nifty.com header.s=dec2015msa header.b=iFsLPq8W; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237100AbhHJAG4 (ORCPT + 99 others); Mon, 9 Aug 2021 20:06:56 -0400 Received: from conssluserg-01.nifty.com ([210.131.2.80]:64272 "EHLO conssluserg-01.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230317AbhHJAGz (ORCPT ); Mon, 9 Aug 2021 20:06:55 -0400 Received: from mail-pj1-f45.google.com (mail-pj1-f45.google.com [209.85.216.45]) (authenticated) by conssluserg-01.nifty.com with ESMTP id 17A06GrM027165; Tue, 10 Aug 2021 09:06:16 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-01.nifty.com 17A06GrM027165 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1628553977; bh=xHNISeRMlTiEcgni+JyLJx7pYa/VEYClQ3P0qFmQuz8=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=iFsLPq8Wac7JCZvN6O8cXOq74M4UKNp7aYvSGvN/Or69nTwQtLoFI0PZJp1lhOEm6 3EPytVbPWGQtdoIyDS6WqQOSg4+wPOCfQeatCpVyPxap+ABf0Sp2t1ctrTuexCu38n lbjFQqBGQLwXvRwfXrV6Zh0cEDZgXTnFoXF7gzmzSU8nxl+mndfYXJI05ACLil7Lss XzPOHP2pHurtB+ly5Wz5453JXJlVcIm5zYue/JSthFnG73l6mZa/x4zrTKnGMTaR4v /aCL3/UNqZW3Xk/5WC/QRwvd5oYeB8FYj1t5fgLGrRpFhKkTlrUn9VUV1wvMInpa6l VGZu06woRWJWw== X-Nifty-SrcIP: [209.85.216.45] Received: by mail-pj1-f45.google.com with SMTP id gz13-20020a17090b0ecdb0290178c0e0ce8bso1321612pjb.1; Mon, 09 Aug 2021 17:06:16 -0700 (PDT) X-Gm-Message-State: AOAM532hZe9C1Gr0Ztm/FThXyLjei+qqIL6eHGMXIUOMgpeN7jNNBn5i tqqFzNk82eBqAMBHwtsvG64AL8PKbacfYcbRITI= X-Received: by 2002:aa7:8e56:0:b029:3cd:c2ec:6c1c with SMTP id d22-20020aa78e560000b02903cdc2ec6c1cmr1422755pfr.80.1628553976079; Mon, 09 Aug 2021 17:06:16 -0700 (PDT) MIME-Version: 1.0 References: <20210802183910.1802120-1-ndesaulniers@google.com> In-Reply-To: <20210802183910.1802120-1-ndesaulniers@google.com> From: Masahiro Yamada Date: Tue, 10 Aug 2021 09:05:39 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v6 0/3] infer --target from SRCARCH for CC=clang To: Nick Desaulniers Cc: Miguel Ojeda , Fangrui Song , Michal Marek , Arnd Bergmann , Linux Kernel Mailing List , Linux Kbuild mailing list , clang-built-linux , Geert Uytterhoeven , Christoph Hellwig , Linus Torvalds Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 3, 2021 at 3:39 AM Nick Desaulniers wrote: > > We get constant feedback that the command line invocation of make is too > long. CROSS_COMPILE is helpful when a toolchain has a prefix of the > target triple, or is an absolute path outside of $PATH, but it's mostly > redundant for a given ARCH. > > Instead, let's infer --target from SRCARCH, and move some flag handling into a > new file included from the top level Makefile. Series, applied to linux-kbuild. Thanks. > Changes v5 -> v6: > * Use indirection as per Linus. > * Change hexagon triple to use -musl rather than -gnu. glibc doesn't > have support for hexagon, and hexagon-linux-musl is the triple we use > in CI. > https://github.com/ClangBuiltLinux/continuous-integration2/blob/d659897d1700894d67feb64fe28e298da399a287/generator.yml#L53 > * Pick up Fangrui's RB. > * Reorder use of Env vars in documentation to use command line > parameters instead, for consistency. > > Changes v4 -> v5: > * Include previously missing first patch! > > Changes v3 -> v4: > * Remove the requirement that LLVM_IAS=1 be set, as per Masahiro. > * Remove the Documentation/ change from patch 2, as per Masahiro and > Nathan. > * Add Documentation/ change as patch 3, from Masahiro. > * Reword commit message of patch 2, as per Nathan. > * Change patch 2 oneline to refer to --target and CC=clang (not > CROSS_COMPILE). > * Carry Arnd's and Nathan's AB/RB/TB tags, confirmed ok on IRC+discord. > > Changes v2 -> v3: > * Remove requirement that LLVM=1 be set. Instead, if building with just > CC=clang LLVM_IAS=1 instead of LLVM=1 LLVM_IAS=1, you should use > LD=ld.lld explicitly, or LD=aarch64-linux-gnu-ld. (As per Masahiro) > Example: > > $ ARCH=arm64 make CC=clang LLVM_IAS=1 LD=ld.lld OBJCOPY=llvm-objcopy \ > STRIP=llvm-strip -j72 defconfig all > > (It's still preferable to use LLVM=1 IMO, but this is maximally > flexible.) > * Change oneliner from LLVM=1 to CC=clang. > * Update Docs slightly. > > Changes v1 -> v2: > * patch 1/2 untouched. > * Fix typos in commit message as per Geert and Masahiro. > * Use SRCARCH instead of ARCH, simplifying x86 handling, as per > Masahiro. Add his sugguested by tag. > * change commit oneline from 'drop' to 'infer.' > * Add detail about explicit host --target and relationship of ARCH to > SRCARCH, as per Masahiro. > > Nick Desaulniers (3): > Makefile: move initial clang flag handling into scripts/Makefile.clang > Makefile: infer --target from ARCH for CC=clang > Documentation/llvm: update CROSS_COMPILE inferencing > > Documentation/kbuild/llvm.rst | 19 ++++++++++++++++++- > MAINTAINERS | 1 + > Makefile | 15 +-------------- > scripts/Makefile.clang | 35 +++++++++++++++++++++++++++++++++++ > 4 files changed, 55 insertions(+), 15 deletions(-) > create mode 100644 scripts/Makefile.clang > > > base-commit: d7a86429dbc691bf540688fcc8542cc20246a85b > -- > 2.32.0.554.ge1b32706d8-goog > -- Best Regards Masahiro Yamada