diff options
author | Otavio Salvador <otavio@ossystems.com.br> | 2021-12-03 17:31:18 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-03 17:31:18 -0300 |
commit | 58a442bdafae4329a61f656d597c76c5fb8da928 (patch) | |
tree | 108b636e78d03c291f9509dc3825d2bb4fdd3175 | |
parent | d70adb5df845c1adb35335a3fabebf54fcee43a0 (diff) | |
parent | d9fb91b0f1e0c0f894ec4ace9ae293d36da3f349 (diff) | |
download | meta-freescale-58a442bdafae4329a61f656d597c76c5fb8da928.tar.gz |
Merge pull request #933 from zandrey/imx-atf-improvements
imx-atf improvements (Clang ready)
-rw-r--r-- | recipes-bsp/imx-atf/imx-atf_2.4.bb | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/recipes-bsp/imx-atf/imx-atf_2.4.bb b/recipes-bsp/imx-atf/imx-atf_2.4.bb index 8360bfa8..ce30822e 100644 --- a/recipes-bsp/imx-atf/imx-atf_2.4.bb +++ b/recipes-bsp/imx-atf/imx-atf_2.4.bb | |||
@@ -25,13 +25,30 @@ EXTRA_OEMAKE += " \ | |||
25 | PLAT=${ATF_PLATFORM} \ | 25 | PLAT=${ATF_PLATFORM} \ |
26 | " | 26 | " |
27 | 27 | ||
28 | # Let the Makefile handle setting up the CFLAGS and LDFLAGS as it is a standalone application | ||
29 | CFLAGS[unexport] = "1" | ||
30 | LDFLAGS[unexport] = "1" | ||
31 | AS[unexport] = "1" | ||
32 | LD[unexport] = "1" | ||
33 | |||
34 | # Baremetal, just need a compiler | ||
35 | DEPENDS:remove = "virtual/${TARGET_PREFIX}compilerlibs virtual/libc" | ||
36 | |||
28 | BUILD_OPTEE = "${@bb.utils.contains('MACHINE_FEATURES', 'optee', 'true', 'false', d)}" | 37 | BUILD_OPTEE = "${@bb.utils.contains('MACHINE_FEATURES', 'optee', 'true', 'false', d)}" |
29 | 38 | ||
30 | CFLAGS:remove:mx8mq = "-O2" | 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. | ||
42 | def remove_options_tail (in_string): | ||
43 | from itertools import takewhile | ||
44 | return ' '.join(takewhile(lambda x: not x.startswith('-'), in_string.split(' '))) | ||
45 | |||
46 | EXTRA_OEMAKE += "LD=${@remove_options_tail(d.getVar('LD'))}" | ||
47 | |||
48 | EXTRA_OEMAKE += "CC=${@remove_options_tail(d.getVar('CC'))}" | ||
31 | 49 | ||
32 | do_compile() { | 50 | do_compile() { |
33 | # Clear LDFLAGS to avoid the option -Wl recognize issue | 51 | # Clear LDFLAGS to avoid the option -Wl recognize issue |
34 | unset LDFLAGS | ||
35 | oe_runmake bl31 | 52 | oe_runmake bl31 |
36 | if ${BUILD_OPTEE}; then | 53 | if ${BUILD_OPTEE}; then |
37 | oe_runmake clean BUILD_BASE=build-optee | 54 | oe_runmake clean BUILD_BASE=build-optee |