package/openocd: fix -fno-common build failure
PATCH 1/1 package/openocd: fix -fno-common build failure
Added upstream patch for fixing build failure when using GCC10 as a host compiler (-fno-common is now default)
Fixes:
http://autobuild.buildroot.org/results/0fc/0fcb11a40bcff78e8084335114af390d2fac31e1
--- .../0003-bitbang-Fix-FTBFS-with-GCC-10.patch | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 package/openocd/0003-bitbang-Fix-FTBFS-with-GCC-10.patch
package/openocd/0003-bitbang-Fix-FTBFS-with-GCC-10.patch new file +37 -0
@@ -0,0 +1,37 @@ +From c60252ac2b636c4d99b766a574b9df0966151696 Mon Sep 17 00:00:00 2001 +From: Andreas Fritiofson <[email protected]> +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 <[email protected]> +Reviewed-on: http://openocd.zylin.com/5592 +Tested-by: jenkins +Reviewed-by: Antonio Borneo <[email protected]> +Reviewed-by: Jonathan McDowell <[email protected]> + +Patch taken from upstream: https://github.com/ntfreak/openocd/commit/c60252ac2b636c4d99b766a574b9df0966151696 +Signed-off-by: Heiko Thiery <heiko.thiery@gmailcom> +--- + 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.20.1 +
Signature · 1 line
2.20.1
Yann E. MORIN
AppliedPATCH 1/1 package/openocd: fix -fno-common build failure
Heiko, All,
On 2020-05-17 09:33 +0200, Heiko Thiery spake thusly:
Quoted 8 lines
Added upstream patch for fixing build failure when using GCC10 as a host compiler (-fno-common is now default)
Fixes:
http://autobuild.buildroot.org/results/0fc/0fcb11a40bcff78e8084335114af390d2fac31e1Cc Romain Naour <[email protected]>Signed-off-by Heiko Thiery <[email protected]>
I've tested it in a Docker container running FC32, and was able to reproduce the issue, and this patch fixed it.
Applied to master, thanks.
Regards,
Yann E. MORIN.
Quoted 55 lines
--- .../0003-bitbang-Fix-FTBFS-with-GCC-10.patch | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 package/openocd/0003-bitbang-Fix-FTBFS-with-GCC-10.patchpackage/openocd/0003-bitbang-Fix-FTBFS-with-GCC-10.patch new file +37
-0@@ -0,0 +1,37 @@ +From c60252ac2b636c4d99b766a574b9df0966151696 Mon Sep 17 00:00:00 2001 +From: Andreas Fritiofson <[email protected]> +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 <[email protected]> +Reviewed-on: http://openocd.zylin.com/5592 +Tested-by: jenkins +Reviewed-by: Antonio Borneo <[email protected]> +Reviewed-by: Jonathan McDowell <[email protected]> + +Patch taken from upstream: https://github.com/ntfreak/openocd/commit/c60252ac2b636c4d99b766a574b9df0966151696 +Signed-off-by: Heiko Thiery <heiko.thiery@gmailcom> +--- + 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.20.1 +Signature · 6 lines
2.20.1 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH 1/1 package/openocd: fix -fno-common build failure
In reply to Heiko ThieryQuoted 10 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Heiko" == Heiko Thiery <[email protected]> writes:
Added upstream patch for fixing build failure when using GCC10 as a host compiler (-fno-common is now default)
Fixes:
http://autobuild.buildroot.org/results/0fc/0fcb11a40bcff78e8084335114af390d2fac31e1Cc Romain Naour <[email protected]>Signed-off-by Heiko Thiery <[email protected]>
Committed to 2020.02.x, thanks.
Signature · 1 line
Bye, Peter Korsgaard