<div dir="ltr"><div>It is preferred not to add patches to our repos when you can reference the upstream to fetch it. You should be able to reference the URL where the "raw" view of the patch is.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Mar 30, 2021 at 4:56 PM Vijay Kumar Banerjee <<a href="mailto:vijay@rtems.org">vijay@rtems.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Close #4366<br>
---<br>
rtems/config/tools/rtems-gdb-9.1-1.cfg | 3 +<br>
.../patches/gdb-9-1-linker-error-fix.diff | 67 +++++++++++++++++++<br>
2 files changed, 70 insertions(+)<br>
create mode 100644 source-builder/patches/gdb-9-1-linker-error-fix.diff<br>
<br>
diff --git a/rtems/config/tools/rtems-gdb-9.1-1.cfg b/rtems/config/tools/rtems-gdb-9.1-1.cfg<br>
index 99e6571..3c398af 100644<br>
--- a/rtems/config/tools/rtems-gdb-9.1-1.cfg<br>
+++ b/rtems/config/tools/rtems-gdb-9.1-1.cfg<br>
@@ -9,4 +9,7 @@<br>
%define gdb_src_ext xz<br>
%hash sha512 gdb-%{gdb_version}.tar.xz hM3UCNgKP8V3neRZxbJhVNMbMp695+OqeHmfseskXYtkuMjuckI4Kh29lbTm+dhP70HRKgZGqnXT3uRwnqH25w==<br>
<br>
+%patch add gdb file://gdb-9-1-linker-error-fix.diff<br>
+%hash sha512 gdb-9-1-linker-error-fix.diff QAtNCgJsDdfKno+IqHwqRGz1SR3YdTm34ERox2fqpgaGHI6H4GqNfmkJcJaIvSgzNxif24vqWO+bF/Djqa6wNg==<br>
+<br>
%include %{_configdir}/gdb-common-1.cfg<br>
diff --git a/source-builder/patches/gdb-9-1-linker-error-fix.diff b/source-builder/patches/gdb-9-1-linker-error-fix.diff<br>
new file mode 100644<br>
index 0000000..d9b57d3<br>
--- /dev/null<br>
+++ b/source-builder/patches/gdb-9-1-linker-error-fix.diff<br>
@@ -0,0 +1,67 @@<br>
+diff --git a/sim/ppc/ld-insn.c b/sim/ppc/ld-insn.c<br>
+index e39131ca133..585071a861f 100644<br>
+--- a/sim/ppc/ld-insn.c<br>
++++ b/sim/ppc/ld-insn.c<br>
+@@ -28,6 +28,24 @@<br>
+ <br>
+ #include "igen.h"<br>
+ <br>
++static model *last_model;<br>
++<br>
++static insn *last_model_macro;<br>
++static insn *last_model_function;<br>
++static insn *last_model_internal;<br>
++static insn *last_model_static;<br>
++static insn *last_model_data;<br>
++<br>
++model *models;<br>
++<br>
++insn *model_macros;<br>
++insn *model_functions;<br>
++insn *model_internal;<br>
++insn *model_static;<br>
++insn *model_data;<br>
++<br>
++int max_model_fields_len;<br>
++<br>
+ static void<br>
+ update_depth(insn_table *entry,<br>
+ lf *file,<br>
+diff --git a/sim/ppc/ld-insn.h b/sim/ppc/ld-insn.h<br>
+index 88318ffa2b3..52baeaa2d84 100644<br>
+--- a/sim/ppc/ld-insn.h<br>
++++ b/sim/ppc/ld-insn.h<br>
+@@ -200,25 +200,15 @@ extern insn_table *load_insn_table<br>
+ table_include *includes,<br>
+ cache_table **cache_rules);<br>
+ <br>
+-model *models;<br>
+-model *last_model;<br>
++extern model *models;<br>
+ <br>
+-insn *model_macros;<br>
+-insn *last_model_macro;<br>
++extern insn *model_macros;<br>
++extern insn *model_functions;<br>
++extern insn *model_internal;<br>
++extern insn *model_static;<br>
++extern insn *model_data;<br>
+ <br>
+-insn *model_functions;<br>
+-insn *last_model_function;<br>
+-<br>
+-insn *model_internal;<br>
+-insn *last_model_internal;<br>
+-<br>
+-insn *model_static;<br>
+-insn *last_model_static;<br>
+-<br>
+-insn *model_data;<br>
+-insn *last_model_data;<br>
+-<br>
+-int max_model_fields_len;<br>
++extern int max_model_fields_len;<br>
+ <br>
+ extern void insn_table_insert_insn<br>
+ (insn_table *table,<br>
+-- <br>
-- <br>
2.26.2<br>
<br>
_______________________________________________<br>
devel mailing list<br>
<a href="mailto:devel@rtems.org" target="_blank">devel@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/devel</a><br>
</blockquote></div></div>