]> code.ossystems Code Review - meta-freescale.git/commitdiff
imx_atf: unexport variables instead of set in compile task
authorAndrey Zhizhikin <andrey.z@gmail.com>
Fri, 3 Dec 2021 09:54:30 +0000 (09:54 +0000)
committerAndrey Zhizhikin <andrey.z@gmail.com>
Fri, 3 Dec 2021 10:05:51 +0000 (10:05 +0000)
CFLAGS, LDFLAGS, AS and LD variables are defined in TF-A Makefile and
are dependent on the target build.

Unexport those flags from build so they can be picked up by TF-A in a
form it is defined in Makefile and not provided by OE build.

Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com>
Cc: Tom Hochstein <tom.hochstein@nxp.com>
recipes-bsp/imx-atf/imx-atf_2.4.bb

index 8360bfa80ef20724d171e85470d3fc7ec442a373..965e09481b486d28c4319685c44ce17a91cda9de 100644 (file)
@@ -25,13 +25,16 @@ EXTRA_OEMAKE += " \
     PLAT=${ATF_PLATFORM} \
 "
 
-BUILD_OPTEE = "${@bb.utils.contains('MACHINE_FEATURES', 'optee', 'true', 'false', d)}"
+# Let the Makefile handle setting up the CFLAGS and LDFLAGS as it is a standalone application
+CFLAGS[unexport] = "1"
+LDFLAGS[unexport] = "1"
+AS[unexport] = "1"
+LD[unexport] = "1"
 
-CFLAGS:remove:mx8mq = "-O2"
+BUILD_OPTEE = "${@bb.utils.contains('MACHINE_FEATURES', 'optee', 'true', 'false', d)}"
 
 do_compile() {
     # Clear LDFLAGS to avoid the option -Wl recognize issue
-    unset LDFLAGS
     oe_runmake bl31
     if ${BUILD_OPTEE}; then
        oe_runmake clean BUILD_BASE=build-optee