diff mbox series

arm/optee: Simplify examples recipe

Message ID 20251010071717.1090445-1-uvv.mail@gmail.com
State New
Headers show
Series arm/optee: Simplify examples recipe | expand

Commit Message

Vyacheslav Yurkov Oct. 10, 2025, 7:17 a.m. UTC
From: Vyacheslav Yurkov <uvv.mail@gmail.com>

Signed-off-by: Vyacheslav Yurkov <uvv.mail@gmail.com>
---
 .../recipes-security/optee/optee-examples.inc |  6 ++--
 ...001-Makefile-Avoid-variable-override.patch | 32 +++++++++++++++++++
 2 files changed, 35 insertions(+), 3 deletions(-)
 create mode 100644 meta-arm/recipes-security/optee/optee-examples/0001-Makefile-Avoid-variable-override.patch
diff mbox series

Patch

diff --git a/meta-arm/recipes-security/optee/optee-examples.inc b/meta-arm/recipes-security/optee/optee-examples.inc
index 648e8c2e..f274f6fa 100644
--- a/meta-arm/recipes-security/optee/optee-examples.inc
+++ b/meta-arm/recipes-security/optee/optee-examples.inc
@@ -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} \
                "
 
diff --git a/meta-arm/recipes-security/optee/optee-examples/0001-Makefile-Avoid-variable-override.patch b/meta-arm/recipes-security/optee/optee-examples/0001-Makefile-Avoid-variable-override.patch
new file mode 100644
index 00000000..170fe461
--- /dev/null
+++ b/meta-arm/recipes-security/optee/optee-examples/0001-Makefile-Avoid-variable-override.patch
@@ -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: