]> code.ossystems Code Review - meta-freescale.git/commitdiff
optee-test-qoriq: fix build failure with GCC9
authorChunrong Guo <chunrong.guo@nxp.com>
Wed, 10 Jul 2019 09:28:29 +0000 (17:28 +0800)
committerOtavio Salvador <otavio@ossystems.com.br>
Fri, 12 Jul 2019 20:18:34 +0000 (17:18 -0300)
*fix the below error:
|error: '%*s' directive argument is not a nul-terminated string [-Werror=format-overflow=]

Signed-off-by: Chunrong Guo <chunrong.guo@nxp.com>
recipes-security/optee/optee-test-qoriq/0001-fix-build-failure-with-GCC-8.patch [deleted file]
recipes-security/optee/optee-test-qoriq/0001-fix-build-failure-with-GCC-9.patch [new file with mode: 0644]
recipes-security/optee/optee-test-qoriq_git.bb

diff --git a/recipes-security/optee/optee-test-qoriq/0001-fix-build-failure-with-GCC-8.patch b/recipes-security/optee/optee-test-qoriq/0001-fix-build-failure-with-GCC-8.patch
deleted file mode 100644 (file)
index bad7c5e..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-From d877fddcef79e856193b9b0a3a3089c22151047f Mon Sep 17 00:00:00 2001
-From: Chunrong Guo <chunrong.guo@nxp.com>
-Date: Fri, 29 Jun 2018 15:49:34 +0800
-Subject: [PATCH] fix build failure with GCC 8
-
-Signed-off-by: BJ DevOps Team <bjdevops@NXP1.onmicrosoft.com>
----
- host/xtest/Makefile            | 2 ++
- host/xtest/adbg/src/adbg_run.c | 2 +-
- 2 files changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/host/xtest/Makefile b/host/xtest/Makefile
-index 832cba2..d95899d 100644
---- a/host/xtest/Makefile
-+++ b/host/xtest/Makefile
-@@ -139,6 +139,8 @@ CFLAGS += -Wall -Wcast-align -Werror \
-         -Wmissing-prototypes -Wnested-externs -Wpointer-arith \
-         -Wshadow -Wstrict-prototypes -Wswitch-default \
-         -Wwrite-strings \
-+          -Wno-stringop-overflow \
-+          -Wno-array-bounds \
-         -Wno-missing-field-initializers -Wno-format-zero-length
- endif
-diff --git a/host/xtest/adbg/src/adbg_run.c b/host/xtest/adbg/src/adbg_run.c
-index 406e429..3b57bbb 100644
---- a/host/xtest/adbg/src/adbg_run.c
-+++ b/host/xtest/adbg/src/adbg_run.c
-@@ -100,7 +100,7 @@ int Do_ADBG_AppendToSuite(
-               snprintf(p, size, "%s+%s", Dest_p->SuiteID_p,
-                        Source_p->SuiteID_p);
-       else
--              strncpy(p, Source_p->SuiteID_p, size);
-+              memcpy(p, Source_p->SuiteID_p, size);
-       free((void *)Dest_p->SuiteID_p);
-       Dest_p->SuiteID_p = p;
--- 
-1.8.3.1
-
diff --git a/recipes-security/optee/optee-test-qoriq/0001-fix-build-failure-with-GCC-9.patch b/recipes-security/optee/optee-test-qoriq/0001-fix-build-failure-with-GCC-9.patch
new file mode 100644 (file)
index 0000000..9b91277
--- /dev/null
@@ -0,0 +1,28 @@
+From 79330c8383e02e91a355964a3cc7b932d03c2517 Mon Sep 17 00:00:00 2001
+From: Chunrong Guo <chunrong.guo@nxp.com>
+Date: Wed, 10 Jul 2019 11:09:01 +0200
+Subject: [PATCH] fix build failure with GCC 9
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: C.r. Guo <nxa13725@lsv07004.swis.us-cdc01.nxp.com>
+---
+ host/xtest/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/host/xtest/Makefile b/host/xtest/Makefile
+index e4e2881..e86e056 100644
+--- a/host/xtest/Makefile
++++ b/host/xtest/Makefile
+@@ -152,7 +152,7 @@ CFLAGS += -Wall -Wcast-align -Werror \
+         -Wmissing-include-dirs -Wmissing-noreturn \
+         -Wmissing-prototypes -Wnested-externs -Wpointer-arith \
+         -Wshadow -Wstrict-prototypes -Wswitch-default \
+-        -Wwrite-strings \
++        -Wwrite-strings -Wno-format-overflow \
+         -Wno-missing-field-initializers -Wno-format-zero-length
+ endif
+-- 
+2.7.4
+
index bb0c30d191d31825aa5071fa87ed544adbeb1a02..1c6ca22e2a127e0af4cba243b3b16014fc1731af 100644 (file)
@@ -9,6 +9,7 @@ DEPENDS = "optee-client-qoriq optee-os-qoriq python-pycrypto-native"
 inherit pythonnative
 
 SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/optee_test;nobranch=1 \
+    file://0001-fix-build-failure-with-GCC-9.patch \
 "
 S = "${WORKDIR}/git"