common.mk: fix CCACHE handling

OP-TEE build system defines the CCACHE variable as the host installed
ccache tool path when ccache is installed [1]. When ccache is not
installed the CCACHE variable is defined as single blank character.
CROSS_COMPILE variable is prefixed with CCACHE as defined in [2].
TF-A v2.11 introduced a build system hardening implying CROSS_COMPILE
must contain the exact toolchain path. For the case when ccache is not
installed, CROSS_COMPILE gets an extra heading space and TF-A build
breaks.
Fix by defining CCACHE only when ccache is effectively installed and
leave CCACHE empty when ccache is not installed.

[1] https://github.com/OP-TEE/build/blob/0c249c77d333c4bdc461650e3bdba5c87a48f0dc/common.mk#L54
[2] https://github.com/OP-TEE/build/blob/b80d8cb05ef6b789e536631f6e8d88118e8483b4/common.mk#L195

Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
1 file changed
tree: 685a26ef29e21abebf6fbb4bf37f1db9bd74b83c
  1. .github/
  2. br-ext/
  3. clang/
  4. fvp/
  5. imx/
  6. kconfigs/
  7. qemu_v8/
  8. rpi3/
  9. stm32mp/
  10. ti/
  11. versal/
  12. zynqmp/
  13. .gitignore
  14. am43xx.mk
  15. am57xx.mk
  16. common.mk
  17. dra7xx.mk
  18. fvp-psa-sp.mk
  19. fvp.mk
  20. get_clang.sh
  21. hikey.mk
  22. hikey960.mk
  23. imx.mk
  24. imx8mp-evk.inc.mk
  25. imx8mp-verdin.inc.mk
  26. juno.mk
  27. poplar.mk
  28. qemu-check.exp
  29. qemu.mk
  30. qemu_v8.mk
  31. README.md
  32. rockpi4.mk
  33. rpi3.mk
  34. rust.exp
  35. soc_term.py
  36. stm32mp1.mk
  37. synquacer.mk
  38. toolchain.mk
  39. trusted-keys.exp
  40. trusted-services.mk
  41. versal.mk
  42. zynqmp.mk
README.md

OP-TEE build.git

This git contains makefiles etc to be able to build a full OP-TEE developer setup for the OP-TEE project.

All official OP-TEE documentation has moved to http://optee.readthedocs.io. The pages that used to be here in this git can be found under build and Device specific information at he new location for the OP-TEE documentation.

// OP-TEE core maintainers