From: Rosen Penev Date: Wed, 1 Jul 2020 02:19:15 +0000 (-0700) Subject: openocd: fix compilation with GCC10 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=f7d32f43d8c9aa4cba04753f412f04e69ed4b524;p=feed%2Fpackages.git openocd: fix compilation with GCC10 Signed-off-by: Rosen Penev --- diff --git a/utils/openocd/Makefile b/utils/openocd/Makefile index c8a6544b5e..30c2e83685 100644 --- a/utils/openocd/Makefile +++ b/utils/openocd/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=openocd PKG_SOURCE_VERSION:=v0.10.0-1000-gdb23c13d PKG_VERSION:=$(PKG_SOURCE_VERSION) -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE_PROTO:=git PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) diff --git a/utils/openocd/patches/010-gcc10.patch b/utils/openocd/patches/010-gcc10.patch new file mode 100644 index 0000000000..9bfb610285 --- /dev/null +++ b/utils/openocd/patches/010-gcc10.patch @@ -0,0 +1,31 @@ +From c60252ac2b636c4d99b766a574b9df0966151696 Mon Sep 17 00:00:00 2001 +From: Andreas Fritiofson +Date: Fri, 17 Apr 2020 13:49:28 +0200 +Subject: [PATCH] bitbang: Fix FTBFS with GCC 10 + +GCC 10 defaults to -fno-common which breaks the sharing of bitbang_swd +struct between bitbang drivers due to a missing extern. + +Change-Id: I2b4122f7939cec91a72284006748f99a23548324 +Signed-off-by: Andreas Fritiofson +Reviewed-on: http://openocd.zylin.com/5592 +Tested-by: jenkins +Reviewed-by: Antonio Borneo +Reviewed-by: Jonathan McDowell +--- + src/jtag/drivers/bitbang.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/jtag/drivers/bitbang.h b/src/jtag/drivers/bitbang.h +index edb779c..bbbc693 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; +