]> code.ossystems Code Review - meta-freescale.git/commitdiff
imx-atf: fix build with -fno-common
authorRicardo Salveti <ricardo@foundries.io>
Mon, 31 Aug 2020 14:40:32 +0000 (11:40 -0300)
committerOtavio Salvador <otavio@ossystems.com.br>
Mon, 31 Aug 2020 14:46:52 +0000 (11:46 -0300)
Backport patch required to fix build with -fno-common.

Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
recipes-bsp/imx-atf/imx-atf/0001-imx-Fix-multiple-definition-of-ipc_handle.patch [new file with mode: 0644]
recipes-bsp/imx-atf/imx-atf_2.0.bb

diff --git a/recipes-bsp/imx-atf/imx-atf/0001-imx-Fix-multiple-definition-of-ipc_handle.patch b/recipes-bsp/imx-atf/imx-atf/0001-imx-Fix-multiple-definition-of-ipc_handle.patch
new file mode 100644 (file)
index 0000000..000eff4
--- /dev/null
@@ -0,0 +1,45 @@
+From 8c433aa6c6b2eaed4084233beea99ee3fb0b652f Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Wed, 4 Dec 2019 02:45:58 -0600
+Subject: [PATCH] imx: Fix multiple definition of ipc_handle
+
+This is not conforming C and does not compile with -fno-common.
+
+Upstream-Status: Backport
+
+Signed-off-by: Samuel Holland <samuel@sholland.org>
+Change-Id: I6535954cc567d6efa06919069b91e3f50975b073
+---
+ plat/imx/common/include/sci/sci_ipc.h | 2 +-
+ plat/imx/common/sci/ipc.c             | 2 ++
+ 2 files changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/plat/imx/common/include/sci/sci_ipc.h b/plat/imx/common/include/sci/sci_ipc.h
+index 7cb109206..d2c3bba1c 100644
+--- a/plat/imx/common/include/sci/sci_ipc.h
++++ b/plat/imx/common/include/sci/sci_ipc.h
+@@ -63,7 +63,7 @@ void sc_ipc_read(sc_ipc_t ipc, void *data);
+  */
+ void sc_ipc_write(sc_ipc_t ipc, const void *data);
+-sc_ipc_t ipc_handle;
++extern sc_ipc_t ipc_handle;
+ #endif /* SC_IPC_H */
+diff --git a/plat/imx/common/sci/ipc.c b/plat/imx/common/sci/ipc.c
+index 68b0b8ef0..3169b7e0b 100644
+--- a/plat/imx/common/sci/ipc.c
++++ b/plat/imx/common/sci/ipc.c
+@@ -11,6 +11,8 @@
+ #include "imx8_mu.h"
++sc_ipc_t ipc_handle;
++
+ #include <bakery_lock.h>
+ DEFINE_BAKERY_LOCK(sc_ipc_bakery_lock);
+ #define sc_ipc_lock_init()    bakery_lock_init(&sc_ipc_bakery_lock)
+-- 
+2.28.0
+
index 33ed6c62672b5bb74d742f374a0a248506fe2f3b..1e1baba3fedf48c1b09d34a72645b702c2e4b190 100644 (file)
@@ -10,6 +10,7 @@ PV .= "+git${SRCPV}"
 SRCBRANCH = "lf-5.4.y"
 SRC_URI = "git://source.codeaurora.org/external/imx/imx-atf.git;protocol=https;branch=${SRCBRANCH} \
            file://0001-Allow-BUILD_STRING-to-be-set-in-.revision-file.patch \
+           file://0001-imx-Fix-multiple-definition-of-ipc_handle.patch \
 "
 SRCREV = "7b3389d49815f1e3f7942bd312a27ee665bd2e33"