summaryrefslogtreecommitdiffstats
path: root/recipes-bsp
diff options
context:
space:
mode:
authorAndrey Zhizhikin <andrey.z@gmail.com>2021-12-03 10:11:02 +0000
committerAndrey Zhizhikin <andrey.z@gmail.com>2021-12-03 10:11:02 +0000
commitd9fb91b0f1e0c0f894ec4ace9ae293d36da3f349 (patch)
tree108b636e78d03c291f9509dc3825d2bb4fdd3175 /recipes-bsp
parent0cc0d30c6ec43d1dc7a1cde172959d7a028b1a29 (diff)
downloadmeta-freescale-d9fb91b0f1e0c0f894ec4ace9ae293d36da3f349.tar.gz
imx-atf: enable clang support
This is a port of commit 5013182 ("trusted-firmware-a: enable clang support") from meta-arm [1]: The CC and LD parameters are used to point make to the currently used compiler and linkers. This change enables TFA to be compiled successfully when TOOLCHAIN=clang. Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com> Link: [1]: https://github.com/jonmason/meta-arm/commit/5013182ddaf7fabc3cc87ba6c923abb7f68214f5
Diffstat (limited to 'recipes-bsp')
-rw-r--r--recipes-bsp/imx-atf/imx-atf_2.4.bb11
1 files changed, 11 insertions, 0 deletions
diff --git a/recipes-bsp/imx-atf/imx-atf_2.4.bb b/recipes-bsp/imx-atf/imx-atf_2.4.bb
index 8792c0cd..ce30822e 100644
--- a/recipes-bsp/imx-atf/imx-atf_2.4.bb
+++ b/recipes-bsp/imx-atf/imx-atf_2.4.bb
@@ -36,6 +36,17 @@ DEPENDS:remove = "virtual/${TARGET_PREFIX}compilerlibs virtual/libc"
36 36
37BUILD_OPTEE = "${@bb.utils.contains('MACHINE_FEATURES', 'optee', 'true', 'false', d)}" 37BUILD_OPTEE = "${@bb.utils.contains('MACHINE_FEATURES', 'optee', 'true', 'false', d)}"
38 38
39# CC and LD introduce arguments which conflict with those otherwise provided by
40# this recipe. The heads of these variables excluding those arguments
41# are therefore used instead.
42def remove_options_tail (in_string):
43 from itertools import takewhile
44 return ' '.join(takewhile(lambda x: not x.startswith('-'), in_string.split(' ')))
45
46EXTRA_OEMAKE += "LD=${@remove_options_tail(d.getVar('LD'))}"
47
48EXTRA_OEMAKE += "CC=${@remove_options_tail(d.getVar('CC'))}"
49
39do_compile() { 50do_compile() {
40 # Clear LDFLAGS to avoid the option -Wl recognize issue 51 # Clear LDFLAGS to avoid the option -Wl recognize issue
41 oe_runmake bl31 52 oe_runmake bl31