diff --git a/docs/user-guide.md b/docs/user-guide.md index 85ece93..5165000 100644 --- a/docs/user-guide.md +++ b/docs/user-guide.md @@ -74,6 +74,9 @@ 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 @@ 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: