0001-Fix-for-an-ARM64-gcc-10-compilation-error.-Without-t.patch 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. From 0dddb4e1158705345b7f4f71635d42c89e1b0c8f Mon Sep 17 00:00:00 2001
  2. From: Dave Anderson <anderson@redhat.com>
  3. Date: Fri, 31 Jan 2020 17:11:46 -0500
  4. Subject: [PATCH] Fix for an ARM64 gcc-10 compilation error. Without the
  5. patch, the build of the embedded gdb module fails with an error message that
  6. indicates "multiple definition of 'tdesc_aarch64'". (anderson@redhat.com)
  7. Upstream-Status: Backport [https://github.com/crash-utility/crash/commit/e770735200c02ac2414c394ea6ec5f7f033efe64]
  8. Signed-off-by: Khem Raj <raj.khem@gmail.com>
  9. ---
  10. gdb-7.6.patch | 30 ++++++++++++++++++++++++++++++
  11. 1 file changed, 30 insertions(+)
  12. diff --git a/gdb-7.6.patch b/gdb-7.6.patch
  13. index f6c311d..f64b55f 100644
  14. --- a/gdb-7.6.patch
  15. +++ b/gdb-7.6.patch
  16. @@ -2471,3 +2471,33 @@ diff -up gdb-7.6/opcodes/configure.orig gdb-7.6/opcodes/configure
  17. #else
  18. # error "!__i386__ && !__x86_64__"
  19. #endif
  20. +--- gdb-7.6/gdb/features/aarch64.c.orig
  21. ++++ gdb-7.6/gdb/features/aarch64.c
  22. +@@ -5,7 +5,6 @@
  23. + #include "osabi.h"
  24. + #include "target-descriptions.h"
  25. +
  26. +-struct target_desc *tdesc_aarch64;
  27. + static void
  28. + initialize_tdesc_aarch64 (void)
  29. + {
  30. +--- gdb-7.6/gdb/aarch64-linux-nat.c.orig
  31. ++++ gdb-7.6/gdb/aarch64-linux-nat.c
  32. +@@ -37,6 +37,7 @@
  33. +
  34. + #include "gregset.h"
  35. +
  36. ++extern struct target_desc *tdesc_aarch64;
  37. + #include "features/aarch64.c"
  38. +
  39. + /* Defines ps_err_e, struct ps_prochandle. */
  40. +--- gdb-7.6/gdb/aarch64-tdep.c.orig
  41. ++++ gdb-7.6/gdb/aarch64-tdep.c
  42. +@@ -52,6 +52,7 @@
  43. + #include "gdb_assert.h"
  44. + #include "vec.h"
  45. +
  46. ++struct target_desc *tdesc_aarch64;
  47. + #include "features/aarch64.c"
  48. + #include "features/aarch64-without-fpu.c"
  49. +
  50. --
  51. 2.28.0