From a5d36574fc787e96e56671eb1b0eaef58e980ca8 Mon Sep 17 00:00:00 2001 From: Harrison Mutai Date: Wed, 23 Feb 2022 11:37:12 +0000 Subject: [PATCH] docs(prerequisites): use LLVM utilities to build with clang Makefile updated to use LLVM utilities instead of GNU utilities when compiling with clang. `CROSS_COMPILE` is not required since this dependency has been removed. Change-Id: I19706b84b9310e07935516681b86596c04ef8ad6 Signed-off-by: Harrison Mutai Signed-off-by: Manish V Badarkhe --- docs/getting_started/initial-build.rst | 24 ++++++++++++------------ docs/getting_started/prerequisites.rst | 6 +++--- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/docs/getting_started/initial-build.rst b/docs/getting_started/initial-build.rst index d4a8f0114..62f1941b1 100644 --- a/docs/getting_started/initial-build.rst +++ b/docs/getting_started/initial-build.rst @@ -18,16 +18,12 @@ Performing an Initial Build It is possible to build TF-A using Clang or Arm Compiler 6. To do so ``CC`` needs to point to the clang or armclang binary, which will - also select the clang or armclang assembler. Be aware that for Arm Compiler, - the GNU linker is used by default. However for Clang LLVM linker (LLD) - is used by default. In case of being needed the linker can be overridden - using the ``LD`` variable. LLVM linker (LLD) version 9 is - known to work with TF-A. - - In both cases ``CROSS_COMPILE`` should be set as described above. - - Arm Compiler 6 will be selected when the base name of the path assigned - to ``CC`` matches the string 'armclang'. + also select the clang or armclang assembler. Arm Compiler 6 will be selected + when the base name of the path assigned to ``CC`` matches the string + 'armclang'. GNU binutils are required since the TF-A build system doesn't + currently support Arm Scatter files. Meaning the GNU linker is used by + default for Arm Compiler 6. Because of this dependency, ``CROSS_COMPILE`` + should be set as described above. For AArch64 using Arm Compiler 6: @@ -36,6 +32,11 @@ Performing an Initial Build export CROSS_COMPILE=/bin/aarch64-none-elf- make CC=/bin/armclang PLAT= all + On the other hand, Clang uses LLVM linker (LLD) and other LLVM binutils by + default instead of GNU utilities (LLVM linker (LLD) 14.0.0 is known to + work with TF-A). ``CROSS_COMPILE`` need not be set for Clang. Please note, + that the default linker may be manually overridden using the ``LD`` variable. + Clang will be selected when the base name of the path assigned to ``CC`` contains the string 'clang'. This is to allow both clang and clang-X.Y to work. @@ -44,7 +45,6 @@ Performing an Initial Build .. code:: shell - export CROSS_COMPILE=/bin/aarch64-none-elf- make CC=/bin/clang PLAT= all - Change to the root directory of the TF-A source tree and build. @@ -115,4 +115,4 @@ Performing an Initial Build -------------- -*Copyright (c) 2020, Arm Limited. All rights reserved.* +*Copyright (c) 2020-2022, Arm Limited. All rights reserved.* diff --git a/docs/getting_started/prerequisites.rst b/docs/getting_started/prerequisites.rst index 92a2c8353..3a54e69fc 100644 --- a/docs/getting_started/prerequisites.rst +++ b/docs/getting_started/prerequisites.rst @@ -27,8 +27,8 @@ Toolchain target the Armv7-A or Armv8-A architectures: - GCC >= 11.2-2022.02 (from the `Arm Developer website`_) -- Clang >= 4.0 -- Arm Compiler >= 6.0 +- Clang >= 14.0.0 +- Arm Compiler >= 6.18 In addition, a native compiler is required to build the supporting tools. @@ -160,7 +160,7 @@ documentation, available `here `_. -------------- -*Copyright (c) 2021, Arm Limited. All rights reserved.* +*Copyright (c) 2021-2022, Arm Limited. All rights reserved.* .. _Arm Developer website: https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/downloads .. _Gerrit Code Review: https://www.gerritcodereview.com/