summaryrefslogtreecommitdiff
path: root/toolchain/elf2flt/patches/a87f68ae9e879360a9624f2a02999e67cfbe5a2f/0001-fix-sh2-toolchain-building.patch
blob: 11d3a1e5f209586b52862ac339a8c180de244f2b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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