Cheb57 / binutils-tricore

GNU/binutils revision 2.13 targetting Infineon tricore CPU architecture
GNU General Public License v2.0
20 stars 10 forks source link

Make failure #2

Closed swkim101 closed 3 years ago

swkim101 commented 3 years ago

Apply this patch to work

https://mudongliang.github.io/2017/07/01/binutils-215-error-array-type-has-incomplete-element-type.html

Modify line 451 in gas/config/tc-i386.h :

extern const struct relax_type md_relax_table[];
=>
extern const struct relax_type * md_relax_table;

Modify Line 366 in gas/config/tc-i386.c:

const relax_typeS md_relax_table[] =
=>
const struct relax_type *md_relax_table =

diff:

diff --git a/binutils-2.15/gas/config/tc-i386.c b/binutils-2.15/gas/config/tc-i386.c
index 5de6a55..6809110 100644
--- a/binutils-2.15/gas/config/tc-i386.c
+++ b/binutils-2.15/gas/config/tc-i386.c
@@ -363,7 +363,7 @@ int x86_cie_data_alignment;
    prefix), and doesn't work, unless the destination is in the bottom
    64k of the code segment (The top 16 bits of eip are zeroed).  */

-const relax_typeS md_relax_table[] =
+const relax_typeS *md_relax_table =
 {
   /* The fields are:
      1) most positive reach of this state,
diff --git a/binutils-2.15/gas/config/tc-i386.h b/binutils-2.15/gas/config/tc-i386.h
index 14b522b..bdd6e9c 100644
--- a/binutils-2.15/gas/config/tc-i386.h
+++ b/binutils-2.15/gas/config/tc-i386.h
@@ -448,7 +448,7 @@ extern int tc_i386_fix_adjustable PARAMS ((struct fix *));

 #define md_operand(x)

-extern const struct relax_type md_relax_table[];
+extern const struct relax_type *md_relax_table;
 #define TC_GENERIC_RELAX_TABLE md_relax_table

 extern int optimize_align_code;
Cheb57 commented 3 years ago

Hi,

No need to patch the code on this repository as the revision of binutils used by the Hightec company is 2.13.

Binutils 2.15 seems to be affected by the issue you mentionned.

However, i was able to build binutils executables files targeting the tricore arch, without this patch.

I will close this issue.

Regards,

Rabia Chebah.

Le 03/12/2020 à 19:25, swkim101 a écrit :

Apply this patch to work

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Cheb57/binutils-tricore/issues/2, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACS3ZLJHGN4SUVPFPH675P3SS7J3PANCNFSM4UMLRXVA.

swkim101 commented 3 years ago

You right. It was my mistake, I missed argument for running ./configure. I also succeed to build tricore-binutils without this patch.

Thank you for your review.