[PATCH] optee-test: disable -Werror

Mikko Rapeli <[email protected]>
Newsgroups org.yoctoproject.lists.meta-arm
Message-ID <[email protected]>
Build is now failing with latest gcc 15.

Signed-off-by: Mikko Rapeli <[email protected]>
---
 ...1-optee-test-disable-Werror-in-xtest.patch | 36 +++++++++++++++++++
 .../optee/optee-test_4.4.0.bb                 |  2 ++
 2 files changed, 38 insertions(+)
 create mode 100644 meta-arm/recipes-security/optee/optee-test/0001-optee-test-disable-Werror-in-xtest.patch

diff --git a/meta-arm/recipes-security/optee/optee-test/0001-optee-test-disable-Werror-in-xtest.patch b/meta-arm/recipes-security/optee/optee-test/0001-optee-test-disable-Werror-in-xtest.patch
new file mode 100644
index 00000000..bb760c56
--- /dev/null
+++ b/meta-arm/recipes-security/optee/optee-test/0001-optee-test-disable-Werror-in-xtest.patch
@@ -0,0 +1,36 @@
+From 813561b54a7da018b3dc38db184e68cd9135ea1c Mon Sep 17 00:00:00 2001
+From: Mikko Rapeli <[email protected]>
+Date: Tue, 6 May 2025 13:14:48 +0000
+Subject: [PATCH] optee-test: disable -Werror in xtest
+
+At distro level we don't care since new toolchains may
+introduce warnings which don't need to break builds.
+Works around build failures like:
+
+./regression_4000_data.h:7919:9: error: initializer-string for array of 'unsigned char' truncates NUL terminator but destination lacks 'nonstring' attribute (20 chars into 19 available) [-Werror=unterminated-string-initialization]
+ 7919 |         "encryption standard";
+      |         ^~~~~~~~~~~~~~~~~~~~~
+
+Signed-off-by: Mikko Rapeli <[email protected]>
+---
+ host/xtest/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Upstream-Status: Inappropriate [configuration]
+
+diff --git a/host/xtest/Makefile b/host/xtest/Makefile
+index 5959ed6..ef5fec0 100644
+--- a/host/xtest/Makefile
++++ b/host/xtest/Makefile
+@@ -142,7 +142,7 @@ CFLAGS += -DTA_DIR=\"$(TA_DIR)\"
+ # Include configuration file generated by OP-TEE OS (CFG_* macros)
+ CFLAGS += -include conf.h
+ 
+-CFLAGS += -Wall -Wcast-align -Werror \
++CFLAGS += -Wall -Wcast-align \
+ 	  -Werror-implicit-function-declaration -Wextra -Wfloat-equal \
+ 	  -Wformat-nonliteral -Wformat-security -Wformat=2 -Winit-self \
+ 	  -Wmissing-declarations -Wmissing-format-attribute \
+-- 
+2.43.0
+
diff --git a/meta-arm/recipes-security/optee/optee-test_4.4.0.bb b/meta-arm/recipes-security/optee/optee-test_4.4.0.bb
index d514c82c..36c5582d 100644
--- a/meta-arm/recipes-security/optee/optee-test_4.4.0.bb
+++ b/meta-arm/recipes-security/optee/optee-test_4.4.0.bb
@@ -3,6 +3,8 @@ require recipes-security/optee/optee-test.inc
 # v4.4.0
 SRCREV = "695231ef8987866663a9ed5afd8f77d1bae3dc08"
 
+SRC_URI += "file://0001-optee-test-disable-Werror-in-xtest.patch"
+
 LIC_FILES_CHKSUM = "file://LICENSE.md;md5=a8fa504109e4cd7ea575bc49ea4be560"
 
 
-- 
2.43.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.