diff --git a/0001-bitbang-Fix-FTBFS-with-GCC-10.patch b/0001-bitbang-Fix-FTBFS-with-GCC-10.patch new file mode 100644 index 0000000..0ed274d --- /dev/null +++ b/0001-bitbang-Fix-FTBFS-with-GCC-10.patch @@ -0,0 +1,34 @@ +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 edb779ca..bbbc693d 100644 +--- a/src/jtag/drivers/bitbang.h ++++ b/src/jtag/drivers/bitbang.h +@@ -56,7 +56,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.25.0 + diff --git a/openocd.changes b/openocd.changes index e5fe2ea..34a011d 100644 --- a/openocd.changes +++ b/openocd.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sun Jun 7 08:31:54 UTC 2020 - Matwey Kornilov + +- Add 0001-bitbang-Fix-FTBFS-with-GCC-10.patch: fix building for gcc 10 + ------------------------------------------------------------------- Mon Feb 3 15:14:43 UTC 2020 - Dominique Leuenberger diff --git a/openocd.spec b/openocd.spec index 8158ad1..61e6359 100644 --- a/openocd.spec +++ b/openocd.spec @@ -36,6 +36,7 @@ Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar. Source1: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2.sig Source2: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2.sha1 Source3: %name.keyring +Patch0: 0001-bitbang-Fix-FTBFS-with-GCC-10.patch BuildRequires: autoconf >= 2.64 BuildRequires: automake BuildRequires: fdupes @@ -81,6 +82,7 @@ This package provides hardware description files and documentation. %prep %setup -q +%patch0 -p1 %build %if !%{external_jimtcl}