From: Nick Desaulniers <ndesaulniers@google.com>
To: Masahiro Yamada <masahiroy@kernel.org>
Cc: Miguel Ojeda <ojeda@kernel.org>,
Fangrui Song <maskray@google.com>,
Michal Marek <michal.lkml@markovi.net>,
Arnd Bergmann <arnd@kernel.org>,
linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org,
clang-built-linux@googlegroups.com,
Geert Uytterhoeven <geert@linux-m68k.org>,
Christoph Hellwig <hch@infradead.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Nick Desaulniers <ndesaulniers@google.com>
Subject: [PATCH v5 3/3] Documentation/llvm: update CROSS_COMPILE inferencing
Date: Fri, 30 Jul 2021 14:57:08 -0700 [thread overview]
Message-ID: <20210730215708.276437-4-ndesaulniers@google.com> (raw)
In-Reply-To: <20210730215708.276437-1-ndesaulniers@google.com>
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 <masahiroy@kernel.org>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
---
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=<triple>``.
+
+Unless ``LLVM_IAS=1`` is specified, ``CROSS_COMPILE`` is also used to derive
+``--prefix=<path>`` to search for the GNU assembler.
+
+If ``CROSS_COMPILE`` is not specified, the ``--target=<triple>`` 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
+
Supported Architectures
-----------------------
--
2.32.0.554.ge1b32706d8-goog
next prev parent reply other threads:[~2021-07-30 21:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-30 21:57 [PATCH v5 0/3] infer --target from SRCARCH for CC=clang Nick Desaulniers
2021-07-30 21:57 ` [PATCH v5 1/3] Makefile: move initial clang flag handling into scripts/Makefile.clang Nick Desaulniers
2021-07-30 21:57 ` [PATCH v5 2/3] Makefile: infer --target from ARCH for CC=clang Nick Desaulniers
2021-07-30 21:57 ` Nick Desaulniers [this message]
2021-07-30 23:12 ` [PATCH v5 3/3] Documentation/llvm: update CROSS_COMPILE inferencing Fangrui Song
2021-07-31 0:04 ` Masahiro Yamada
2021-08-02 18:30 ` Nick Desaulniers
2021-08-02 17:57 ` Nick Desaulniers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210730215708.276437-4-ndesaulniers@google.com \
--to=ndesaulniers@google.com \
--cc=arnd@kernel.org \
--cc=clang-built-linux@googlegroups.com \
--cc=geert@linux-m68k.org \
--cc=hch@infradead.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=maskray@google.com \
--cc=michal.lkml@markovi.net \
--cc=ojeda@kernel.org \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®