lkml.org 
[lkml]   [2021]   [Jul]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v5 3/3] Documentation/llvm: update CROSS_COMPILE inferencing
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 <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.

and the GNU linker.

Reviewed-by: Fangrui Song <maskray@google.com>

>+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

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
>

\
 
 \ /
  Last update: 2021-07-31 01:14    [W:0.078 / U:2.252 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site