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=-20.4 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FSL_HELO_FAKE, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=unavailable 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 BB50AC4338F for ; Fri, 30 Jul 2021 23:13:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A156F60F00 for ; Fri, 30 Jul 2021 23:13:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233775AbhG3XNH (ORCPT ); Fri, 30 Jul 2021 19:13:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33204 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233372AbhG3XNF (ORCPT ); Fri, 30 Jul 2021 19:13:05 -0400 Received: from mail-pj1-x1031.google.com (mail-pj1-x1031.google.com [IPv6:2607:f8b0:4864:20::1031]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 88249C06175F for ; Fri, 30 Jul 2021 16:12:58 -0700 (PDT) Received: by mail-pj1-x1031.google.com with SMTP id j1so17344865pjv.3 for ; Fri, 30 Jul 2021 16:12:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=rF7mbISoz19dUz/oW6jxXI568yNQq5pNBLha/PiCGUk=; b=e40z75Cvx9jiXQ8fL+z9FrTa2M9GVFRD1AT1wCVful0LoFt40nDMQZHchxYNbkeCXs NiXt/boy+Q8vM38x+KjQiFGRpeCa2lYTKKAUpErF05alt9de90aNHs/fNGkYayptqS4c 5vCWgySFChnhRhCz/Fb/1Y41TwMhcIYlE4yx8b7QsitBxth7mtSCmytJuTp5zBahDPnc QUlKICvBaJdh5VZGzvhSqxYjH07PLYyIoSwUMT9TPo8TWWQ93ii0i9osxu48rC0K+iGz 9VswqTxdcLsHbAfWN12RfsxYBljwMd6VLV/hDk7vW+aPzz932ExF3mVjjH9mLljSMCMZ ZMwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=rF7mbISoz19dUz/oW6jxXI568yNQq5pNBLha/PiCGUk=; b=Q3KfGHqFrumWwzi+MDTh2HULxGDYmy93WnOcdQ984UQwKoDaFiLp0b7xQKbjz/z9Wu NSVifNgDLNm4RW4Rgblzax/3dt1GwM5FHqAuJWPJ3dP++l8sABfi+0bG6lIgiNfQF/Pj zYYYCbuHvcMW0amHTJPYUEM68BVFTPK2r/+rIhUhQQ5hvgtEzbFG5o5CoIPY2X3fQmY+ KpX/rSn7Gr80HdhPFjpgL/yQxWLqkMC6LwM9Gh+3Cp8CX61FHZI6xS1yAihgIg6OIU4V 9Qcr+8rS/XszvYDrxWkREZi6DN9+sBUdyw1FFUS56V7TPprmNj5bCopacbEgNbrRYjus Lauw== X-Gm-Message-State: AOAM533sC5KRG7suafmu+0FmDAlgghYFKeEAGgzleX8pqnCpaKnVDnME zaHGL/4T8YfGzHcJrrIWiZpfWA== X-Google-Smtp-Source: ABdhPJxTPa3w3pVzlRJtexQCNQ7AQtdL/PoUa8qYm2V8jVpfzJrO/RfSBl7DGR6nHwzQFvvthQE1Pw== X-Received: by 2002:a63:d757:: with SMTP id w23mr4312873pgi.434.1627686777969; Fri, 30 Jul 2021 16:12:57 -0700 (PDT) Received: from google.com ([2620:15c:2ce:200:160:995:7f22:dc59]) by smtp.gmail.com with ESMTPSA id j15sm3487012pfh.194.2021.07.30.16.12.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Jul 2021 16:12:57 -0700 (PDT) Date: Fri, 30 Jul 2021 16:12:52 -0700 From: Fangrui Song To: Nick Desaulniers Cc: Masahiro Yamada , Miguel Ojeda , Michal Marek , Arnd Bergmann , linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, clang-built-linux@googlegroups.com, Geert Uytterhoeven , Christoph Hellwig , Linus Torvalds Subject: Re: [PATCH v5 3/3] Documentation/llvm: update CROSS_COMPILE inferencing Message-ID: <20210730231252.r6fi6c3i6obbcgfi@google.com> References: <20210730215708.276437-1-ndesaulniers@google.com> <20210730215708.276437-4-ndesaulniers@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20210730215708.276437-4-ndesaulniers@google.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021-07-30, Nick Desaulniers wrote: >As noted by Masahiro, document how we can generally infer CROSS_COMPILE >(and the more specific details about --target and --prefix) based on >ARCH. > >Suggested-by: Masahiro Yamada >Signed-off-by: Nick Desaulniers >--- > Documentation/kbuild/llvm.rst | 17 +++++++++++++++++ > 1 file changed, 17 insertions(+) > >diff --git a/Documentation/kbuild/llvm.rst b/Documentation/kbuild/llvm.rst >index b18401d2ba82..4292f0686316 100644 >--- a/Documentation/kbuild/llvm.rst >+++ b/Documentation/kbuild/llvm.rst >@@ -63,6 +63,23 @@ They can be enabled individually. The full list of the parameters: :: > Currently, the integrated assembler is disabled by default. You can pass > ``LLVM_IAS=1`` to enable it. > >+Omitting CROSS_COMPILE >+---------------------- >+ >+As explained above, ``CROSS_COMPILE`` is used to set ``--target=``. >+ >+Unless ``LLVM_IAS=1`` is specified, ``CROSS_COMPILE`` is also used to derive >+``--prefix=`` to search for the GNU assembler. and the GNU linker. Reviewed-by: Fangrui Song >+If ``CROSS_COMPILE`` is not specified, the ``--target=`` is inferred >+from ``ARCH``. >+ >+That means if you use only LLVM tools, ``CROSS_COMPILE`` becomes unnecessary. >+ >+For example, to cross-compile the arm64 kernel:: >+ >+ ARCH=arm64 make LLVM=1 LLVM_IAS=1 Is ARCH=arm64 make LLVM=1 LLVM_IAS=1 preferred over make ARCH=arm64 LLVM=1 LLVM_IAS=1 ? > Supported Architectures > ----------------------- > >-- >2.32.0.554.ge1b32706d8-goog >