aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2020-08-13 17:51:56 -0700
committerKhem Raj <raj.khem@gmail.com>2020-08-13 22:37:48 -0700
commitfc2217f310e01debc28b3e4f29704a8434adbc17 (patch)
tree1fc30a5462b976c19021c0c9b0675656228854dc
parent857dcd9cc815abed35f833e9a314e6b6529908c2 (diff)
downloadmeta-openembedded-contrib-fc2217f310e01debc28b3e4f29704a8434adbc17.tar.gz
meta-openembedded-contrib-fc2217f310e01debc28b3e4f29704a8434adbc17.tar.bz2
meta-openembedded-contrib-fc2217f310e01debc28b3e4f29704a8434adbc17.zip
openocd: Fix build with gcc10/-fno-common
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-oe/recipes-devtools/openocd/openocd/0001-bitbang-Make-bitbang_swd-extern-definition.patch42
-rw-r--r--meta-oe/recipes-devtools/openocd/openocd_git.bb1
2 files changed, 43 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/openocd/openocd/0001-bitbang-Make-bitbang_swd-extern-definition.patch b/meta-oe/recipes-devtools/openocd/openocd/0001-bitbang-Make-bitbang_swd-extern-definition.patch
new file mode 100644
index 0000000000..d42b628dae
--- /dev/null
+++ b/meta-oe/recipes-devtools/openocd/openocd/0001-bitbang-Make-bitbang_swd-extern-definition.patch
@@ -0,0 +1,42 @@
+From 428f9f3c4a5be973e4c7fc1325ae9dbe41040df2 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 13 Aug 2020 17:47:35 -0700
+Subject: [PATCH] bitbang: Make bitbang_swd extern definition
+
+Fixes build with gcc10+
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/jtag/drivers/bitbang.c | 1 +
+ src/jtag/drivers/bitbang.h | 2 +-
+ 2 files changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/jtag/drivers/bitbang.c b/src/jtag/drivers/bitbang.c
+index b5078c080..f8612aade 100644
+--- a/src/jtag/drivers/bitbang.c
++++ b/src/jtag/drivers/bitbang.c
+@@ -43,6 +43,7 @@ static int bitbang_stableclocks(int num_cycles);
+ static void bitbang_swd_write_reg(uint8_t cmd, uint32_t value, uint32_t ap_delay_clk);
+
+ struct bitbang_interface *bitbang_interface;
++const struct swd_driver bitbang_swd;
+
+ /* DANGER!!!! clock absolutely *MUST* be 0 in idle or reset won't work!
+ *
+diff --git a/src/jtag/drivers/bitbang.h b/src/jtag/drivers/bitbang.h
+index 577717ebd..0faf5d9ae 100644
+--- a/src/jtag/drivers/bitbang.h
++++ b/src/jtag/drivers/bitbang.h
+@@ -57,7 +57,7 @@ struct bitbang_interface {
+ void (*swdio_drive)(bool on);
+ };
+
+-const struct swd_driver bitbang_swd;
++extern const struct swd_driver bitbang_swd;
+
+ extern bool swd_mode;
+
+--
+2.28.0
+
diff --git a/meta-oe/recipes-devtools/openocd/openocd_git.bb b/meta-oe/recipes-devtools/openocd/openocd_git.bb
index f01b224fac..c7d754fdba 100644
--- a/meta-oe/recipes-devtools/openocd/openocd_git.bb
+++ b/meta-oe/recipes-devtools/openocd/openocd_git.bb
@@ -10,6 +10,7 @@ SRC_URI = " \
git://repo.or.cz/r/jimtcl.git;protocol=http;destsuffix=git/jimtcl;name=jimtcl \
git://repo.or.cz/r/libjaylink.git;protocol=http;destsuffix=git/src/jtag/drivers/libjaylink;name=libjaylink \
file://0001-Do-not-include-syscrtl.h-with-glibc.patch \
+ file://0001-bitbang-Make-bitbang_swd-extern-definition.patch \
"
SRCREV_FORMAT = "openocd"