@@ -12,11 +12,11 @@ inherit python3native
require optee.inc
SRC_URI = "git://github.com/linaro-swg/optee_examples.git;branch=master;protocol=https \
+ file://0001-Makefile-Avoid-variable-override.patch \
"
-EXTRA_OEMAKE += "TA_DEV_KIT_DIR=${TA_DEV_KIT_DIR} \
- HOST_CROSS_COMPILE=${HOST_PREFIX} \
- TA_CROSS_COMPILE=${HOST_PREFIX} \
+EXTRA_OEMAKE = "TA_DEV_KIT_DIR=${TA_DEV_KIT_DIR} \
+ CROSS_COMPILE=${HOST_PREFIX} \
OUTPUT_DIR=${B} \
"
new file mode 100644
@@ -0,0 +1,32 @@
+From ad981dad843712c21a01f61461fd5cd34f147b4a Mon Sep 17 00:00:00 2001
+From: Vyacheslav Yurkov <uvv.mail@gmail.com>
+Date: Thu, 9 Oct 2025 08:30:52 +0000
+Subject: [PATCH] Makefile: Avoid variable override
+
+When CROSS_COMPILE is set in the environment / command line, we should
+not directly pass it to the subshell, otherwise it's evaluated to an
+empty string.
+
+Signed-off-by: Vyacheslav Yurkov <uvv.mail@gmail.com>
+Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
+Acked-by: Mikko Rapeli mikko.rapeli@linaro.org
+
+Upstream-Status: Backport
+[https://github.com/linaro-swg/optee_examples/commit/bbaca7ef34c82c052c6e1470cf379561952fc995]
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 9359d95..4256139 100644
+--- a/Makefile
++++ b/Makefile
+@@ -12,7 +12,7 @@ clean: examples-clean prepare-for-rootfs-clean
+
+ examples:
+ @for example in $(EXAMPLE_LIST); do \
+- $(MAKE) -C $$example CROSS_COMPILE="$(HOST_CROSS_COMPILE)" || exit 1; \
++ $(MAKE) -C $$example || exit 1; \
+ done
+
+ examples-clean: