You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
1.1 KiB

  1. From c60252ac2b636c4d99b766a574b9df0966151696 Mon Sep 17 00:00:00 2001
  2. From: Andreas Fritiofson <andreas.fritiofson@gmail.com>
  3. Date: Fri, 17 Apr 2020 13:49:28 +0200
  4. Subject: [PATCH] bitbang: Fix FTBFS with GCC 10
  5. GCC 10 defaults to -fno-common which breaks the sharing of bitbang_swd
  6. struct between bitbang drivers due to a missing extern.
  7. Change-Id: I2b4122f7939cec91a72284006748f99a23548324
  8. Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
  9. Reviewed-on: http://openocd.zylin.com/5592
  10. Tested-by: jenkins
  11. Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
  12. Reviewed-by: Jonathan McDowell <noodles-openocd@earth.li>
  13. ---
  14. src/jtag/drivers/bitbang.h | 2 +-
  15. 1 file changed, 1 insertion(+), 1 deletion(-)
  16. diff --git a/src/jtag/drivers/bitbang.h b/src/jtag/drivers/bitbang.h
  17. index edb779c..bbbc693 100644
  18. --- a/src/jtag/drivers/bitbang.h
  19. +++ b/src/jtag/drivers/bitbang.h
  20. @@ -57,7 +57,7 @@ struct bitbang_interface {
  21. void (*swdio_drive)(bool on);
  22. };
  23. -const struct swd_driver bitbang_swd;
  24. +extern const struct swd_driver bitbang_swd;
  25. extern bool swd_mode;