summaryrefslogtreecommitdiffstats
path: root/meta-rcar-gen3/recipes-bsp
diff options
context:
space:
mode:
authorKhang Nguyen <khang.nguyen.xw@renesas.com>2019-06-20 11:00:27 +0700
committerDuy Dang <duy.dang.yw@renesas.com>2019-09-23 11:17:08 +0700
commitf1e9f09d0ed2ef3423cb9e85309be85b0c0c130b (patch)
tree7acdd8d5cd2faa54d19ef3acd636b0c591038f22 /meta-rcar-gen3/recipes-bsp
parent538a6f55e7860c8cd4ce883a15ea589d631ad703 (diff)
rcar-gen3: optee-client: WORKAROUND to build with GCC 9.x
This commit applies a W/A patch from optee upstream to fix GCC 9 format-truncation errors. [1] https://github.com/OP-TEE/optee_client/issues/126 Signed-off-by: Khang Nguyen <khang.nguyen.xw@renesas.com> Signed-off-by: Takamitsu Honda <takamitsu.honda.pv@renesas.com> Change-Id: Iafdda8934e315366d0d4546d37b63c5bdb4b5a3e
Diffstat (limited to 'meta-rcar-gen3/recipes-bsp')
-rw-r--r--meta-rcar-gen3/recipes-bsp/optee/optee-client/0001-Fix-for-teec_trace.c-snprintf-Werror-format-truncati.patch28
-rw-r--r--meta-rcar-gen3/recipes-bsp/optee/optee-client_git.bb1
2 files changed, 29 insertions, 0 deletions
diff --git a/meta-rcar-gen3/recipes-bsp/optee/optee-client/0001-Fix-for-teec_trace.c-snprintf-Werror-format-truncati.patch b/meta-rcar-gen3/recipes-bsp/optee/optee-client/0001-Fix-for-teec_trace.c-snprintf-Werror-format-truncati.patch
new file mode 100644
index 0000000..db8bdac
--- /dev/null
+++ b/meta-rcar-gen3/recipes-bsp/optee/optee-client/0001-Fix-for-teec_trace.c-snprintf-Werror-format-truncati.patch
@@ -0,0 +1,28 @@
+From 30dd2986fb64aba7ee78d4e231c344e2c39d7999 Mon Sep 17 00:00:00 2001
+From: Simon Hughes <simon.hughes@arm.com>
+Date: Thu, 21 Jun 2018 17:22:23 +0100
+Subject: [PATCH] Fix for teec_trace.c snprintf -Werror=format-truncation=
+ error.
+
+Signed-off-by: Simon Hughes <simon.hughes@arm.com>
+---
+ libteec/src/teec_trace.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/libteec/src/teec_trace.c b/libteec/src/teec_trace.c
+index 78b79d6..c91bc43 100644
+--- a/libteec/src/teec_trace.c
++++ b/libteec/src/teec_trace.c
+@@ -106,7 +106,8 @@ int _dprintf(const char *function, int flen, int line, int level,
+ */
+ int thread_id = syscall(SYS_gettid); /* perf issue ? */
+
+- snprintf(prefixed, MAX_PRINT_SIZE,
++ int len = 0;
++ len = snprintf(prefixed+len, MAX_PRINT_SIZE,
+ "%s [%d] %s:%s:%d: %s",
+ trace_level_strings[level], thread_id, prefix, func,
+ line, raw);
+--
+2.7.4
+
diff --git a/meta-rcar-gen3/recipes-bsp/optee/optee-client_git.bb b/meta-rcar-gen3/recipes-bsp/optee/optee-client_git.bb
index c31fa1b..439ea97 100644
--- a/meta-rcar-gen3/recipes-bsp/optee/optee-client_git.bb
+++ b/meta-rcar-gen3/recipes-bsp/optee/optee-client_git.bb
@@ -11,6 +11,7 @@ SRCREV = "3f16662284a69fdec97b1712064be94d1fed7ae7"
SRC_URI += " \
file://optee.service \
file://0001-tee-supplicant-use-MMC_IOC_MULTI_CMD-for-RPMB-access.patch \
+ file://0001-Fix-for-teec_trace.c-snprintf-Werror-format-truncati.patch \
"
inherit pythonnative systemd