On Tue, Mar 30, 2021 at 4:18 PM Joel Sherrill <j...@rtems.org> wrote:
>
> 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.
>
Thanks for reviewing. The issue with that was that I was getting merge
conflicts from the ChangeLog file so this is a workaround to get the
changes in code. I can add the commit hash in the commit message and
add the original commit message to the diff.

> On Tue, Mar 30, 2021 at 4:56 PM Vijay Kumar Banerjee <vi...@rtems.org> wrote:
>>
>> Close #4366
>> ---
>>  rtems/config/tools/rtems-gdb-9.1-1.cfg        |  3 +
>>  .../patches/gdb-9-1-linker-error-fix.diff     | 67 +++++++++++++++++++
>>  2 files changed, 70 insertions(+)
>>  create mode 100644 source-builder/patches/gdb-9-1-linker-error-fix.diff
>>
>> diff --git a/rtems/config/tools/rtems-gdb-9.1-1.cfg 
>> b/rtems/config/tools/rtems-gdb-9.1-1.cfg
>> index 99e6571..3c398af 100644
>> --- a/rtems/config/tools/rtems-gdb-9.1-1.cfg
>> +++ b/rtems/config/tools/rtems-gdb-9.1-1.cfg
>> @@ -9,4 +9,7 @@
>>  %define gdb_src_ext xz
>>  %hash sha512 gdb-%{gdb_version}.tar.xz 
>> hM3UCNgKP8V3neRZxbJhVNMbMp695+OqeHmfseskXYtkuMjuckI4Kh29lbTm+dhP70HRKgZGqnXT3uRwnqH25w==
>>
>> +%patch add gdb file://gdb-9-1-linker-error-fix.diff
>> +%hash sha512 gdb-9-1-linker-error-fix.diff 
>> QAtNCgJsDdfKno+IqHwqRGz1SR3YdTm34ERox2fqpgaGHI6H4GqNfmkJcJaIvSgzNxif24vqWO+bF/Djqa6wNg==
>> +
>>  %include %{_configdir}/gdb-common-1.cfg
>> diff --git a/source-builder/patches/gdb-9-1-linker-error-fix.diff 
>> b/source-builder/patches/gdb-9-1-linker-error-fix.diff
>> new file mode 100644
>> index 0000000..d9b57d3
>> --- /dev/null
>> +++ b/source-builder/patches/gdb-9-1-linker-error-fix.diff
>> @@ -0,0 +1,67 @@
>> +diff --git a/sim/ppc/ld-insn.c b/sim/ppc/ld-insn.c
>> +index e39131ca133..585071a861f 100644
>> +--- a/sim/ppc/ld-insn.c
>> ++++ b/sim/ppc/ld-insn.c
>> +@@ -28,6 +28,24 @@
>> +
>> + #include "igen.h"
>> +
>> ++static model *last_model;
>> ++
>> ++static insn *last_model_macro;
>> ++static insn *last_model_function;
>> ++static insn *last_model_internal;
>> ++static insn *last_model_static;
>> ++static insn *last_model_data;
>> ++
>> ++model *models;
>> ++
>> ++insn *model_macros;
>> ++insn *model_functions;
>> ++insn *model_internal;
>> ++insn *model_static;
>> ++insn *model_data;
>> ++
>> ++int max_model_fields_len;
>> ++
>> + static void
>> + update_depth(insn_table *entry,
>> +            lf *file,
>> +diff --git a/sim/ppc/ld-insn.h b/sim/ppc/ld-insn.h
>> +index 88318ffa2b3..52baeaa2d84 100644
>> +--- a/sim/ppc/ld-insn.h
>> ++++ b/sim/ppc/ld-insn.h
>> +@@ -200,25 +200,15 @@ extern insn_table *load_insn_table
>> +  table_include *includes,
>> +  cache_table **cache_rules);
>> +
>> +-model *models;
>> +-model *last_model;
>> ++extern model *models;
>> +
>> +-insn *model_macros;
>> +-insn *last_model_macro;
>> ++extern insn *model_macros;
>> ++extern insn *model_functions;
>> ++extern insn *model_internal;
>> ++extern insn *model_static;
>> ++extern insn *model_data;
>> +
>> +-insn *model_functions;
>> +-insn *last_model_function;
>> +-
>> +-insn *model_internal;
>> +-insn *last_model_internal;
>> +-
>> +-insn *model_static;
>> +-insn *last_model_static;
>> +-
>> +-insn *model_data;
>> +-insn *last_model_data;
>> +-
>> +-int max_model_fields_len;
>> ++extern int max_model_fields_len;
>> +
>> + extern void insn_table_insert_insn
>> + (insn_table *table,
>> +--
>> --
>> 2.26.2
>>
>> _______________________________________________
>> devel mailing list
>> devel@rtems.org
>> http://lists.rtems.org/mailman/listinfo/devel
_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Reply via email to