Quellcode durchsuchen

sh2: fix elf2flt build

Waldemar Brodkorb vor 8 Jahren
Ursprung
Commit
2bea9aa062
1 geänderte Dateien mit 49 neuen und 0 gelöschten Zeilen
  1. 49 0
      toolchain/elf2flt/patches/git/0001-fix-sh2-toolchain-building.patch

+ 49 - 0
toolchain/elf2flt/patches/git/0001-fix-sh2-toolchain-building.patch

@@ -0,0 +1,49 @@
+From 123fe2e98cce5c82d81d2a350529a1ea712a4058 Mon Sep 17 00:00:00 2001
+From: Waldemar Brodkorb <wbx@openadk.org>
+Date: Sat, 26 Mar 2016 10:26:56 +0100
+Subject: [PATCH] fix sh2 toolchain building
+
+
+Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
+---
+ elf2flt.c |   10 ++++++----
+ 1 file changed, 6 insertions(+), 4 deletions(-)
+
+diff --git a/elf2flt.c b/elf2flt.c
+index 7d0e639..3546341 100644
+--- a/elf2flt.c
++++ b/elf2flt.c
+@@ -101,8 +101,10 @@ const char *elf2flt_progname;
+ #define	ARCH	"sparc"
+ #elif defined(TARGET_v850)
+ #define	ARCH	"v850"
+-#elif defined(TARGET_sh)
+-#define	ARCH	"sh"
++#elif defined(TARGET_sh2)
++#define	ARCH	"sh2"
++#elif defined(TARGET_sh2eb)
++#define	ARCH	"sh2"
+ #elif defined(TARGET_h8300)
+ #define	ARCH	"h8300"
+ #elif defined(TARGET_microblaze)
+@@ -1260,7 +1262,7 @@ NIOS2_RELOC_ERR:
+ #endif /* TARGET_sparc */
+ 
+ 
+-#ifdef TARGET_sh
++#if defined(TARGET_sh2) || defined(TARGET_sh2eb)
+ 				case R_SH_DIR32:
+ 					relocation_needed = 1;
+ 					sym_vma = bfd_section_vma(abs_bfd, sym_section);
+@@ -1271,7 +1273,7 @@ NIOS2_RELOC_ERR:
+ 					sym_addr += sym_vma + q->addend;
+ 					sym_addr -= q->address;
+ 					break;
+-#endif /* TARGET_sh */
++#endif /* TARGET_sh2 / TARGET_sh2eb */
+ 
+ #ifdef TARGET_e1
+ #define  htoe1l(x)              htonl(x)
+-- 
+1.7.10.4
+