From: dp-arm Date: Mon, 15 May 2017 12:50:51 +0000 (+0100) Subject: docs: Add note on how to build TF using clang or armclang X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=8237708368f0e206eb0cb2d6dafef95dd6c83b36;p=project%2Fbcm63xx%2Fatf.git docs: Add note on how to build TF using clang or armclang Change-Id: I92fd2fb920fcfc31bfcdadae787d8c84c5ca463b Signed-off-by: dp-arm --- diff --git a/docs/user-guide.md b/docs/user-guide.md index 85ece930..5165000d 100644 --- a/docs/user-guide.md +++ b/docs/user-guide.md @@ -74,6 +74,9 @@ The [Linaro Release Notes][Linaro Release Notes] documents which version of the compiler to use for a given Linaro Release. Also, these [Linaro instructions][Linaro SW Instructions] provide further guidance. +Optionally, Trusted Firmware can be built using clang or ARM Compiler 6. +See instructions below on how to switch the default compiler. + In addition, the following optional packages and tools may be needed: * `device-tree-compiler` package if you need to rebuild the Flattened Device @@ -104,6 +107,28 @@ Download the Trusted Firmware source code from Github: export CROSS_COMPILE=/bin/arm-linux-gnueabihf- + It is possible to build Trusted Firmware using clang or ARM Compiler 6. + To do so `CC` needs to point to the clang or armclang binary. Only the + compiler is switched; the assembler and linker need to be provided by + the GNU toolchain, thus `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'. + + For AArch64 using ARM Compiler 6: + + export CROSS_COMPILE=/bin/aarch64-linux-gnu- + make CC=/bin/armclang PLAT= all + + 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. + + For AArch64 using clang: + + export CROSS_COMPILE=/bin/aarch64-linux-gnu- + make CC=/bin/clang PLAT= all + * Change to the root directory of the Trusted Firmware source tree and build. For AArch64: