Documentation/llvm: update CROSS_COMPILE inferencing

As noted by Masahiro, document how we can generally infer CROSS_COMPILE
(and the more specific details about --target and --prefix) based on
ARCH.

Change use of env vars to command line parameters.

Suggested-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Fangrui Song <maskray@google.com>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Divyanshu-Modi <divyan.m05@gmail.com>
Signed-off-by: Cyber Knight <cyberknight755@gmail.com>
This commit is contained in:
Nick Desaulniers
2021-10-23 00:30:38 +05:30
committed by Ansh
parent 4727cdff14
commit db032b0d40

View File

@@ -125,6 +125,24 @@ yet. Bug reports are always welcome at the issue tracker below!
- Supported
- ``LLVM=1``
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 linker.
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::
make ARCH=arm64 LLVM=1 LLVM_IAS=1
Supported Architectures
-----------------------