summaryrefslogtreecommitdiff
path: root/toolchain/elf2flt
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2017-10-03 16:14:37 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2017-10-03 16:15:20 +0200
commit0d1b076fba319bbd480d5fcad5d4af33c5acd659 (patch)
tree658f411f3cde03e9146596441fddf5de85e525c5 /toolchain/elf2flt
parentfa6fcbc9f75bc5a5962f9dd4327ae80ea35c59a7 (diff)
j2/sh2: fix toolchain compiling
Diffstat (limited to 'toolchain/elf2flt')
-rw-r--r--toolchain/elf2flt/Makefile3
-rw-r--r--toolchain/elf2flt/patches/6d80ab6c93409e796f85da404bde84b841231531/0002-sh2.patch43
2 files changed, 46 insertions, 0 deletions
diff --git a/toolchain/elf2flt/Makefile b/toolchain/elf2flt/Makefile
index 244b61f67..e2281cd8c 100644
--- a/toolchain/elf2flt/Makefile
+++ b/toolchain/elf2flt/Makefile
@@ -12,6 +12,9 @@ endif
ifeq ($(ADK_TOOLCHAIN_BINUTILS_2_29),y)
BINUTILS_VERSION:= 2.29.1
endif
+ifeq ($(ADK_TOOLCHAIN_BINUTILS_2_28),y)
+BINUTILS_VERSION:= 2.28
+endif
$(WRKBUILD)/.configured:
(cd $(WRKBUILD); \
diff --git a/toolchain/elf2flt/patches/6d80ab6c93409e796f85da404bde84b841231531/0002-sh2.patch b/toolchain/elf2flt/patches/6d80ab6c93409e796f85da404bde84b841231531/0002-sh2.patch
new file mode 100644
index 000000000..59e263bc0
--- /dev/null
+++ b/toolchain/elf2flt/patches/6d80ab6c93409e796f85da404bde84b841231531/0002-sh2.patch
@@ -0,0 +1,43 @@
+diff -Nur elf2flt-6d80ab6c93409e796f85da404bde84b841231531.orig/elf2flt.c elf2flt-6d80ab6c93409e796f85da404bde84b841231531/elf2flt.c
+--- elf2flt-6d80ab6c93409e796f85da404bde84b841231531.orig/elf2flt.c 2017-10-03 10:36:02.718919968 +0200
++++ elf2flt-6d80ab6c93409e796f85da404bde84b841231531/elf2flt.c 2017-10-03 10:37:42.402568044 +0200
+@@ -74,7 +74,7 @@
+ #define FLAT_NIOS2_R_HIADJ_LO 2
+ #define FLAT_NIOS2_R_CALL26 4
+ #include <elf/nios2.h>
+-#elif defined(TARGET_sh)
++#elif defined(TARGET_sh2) || defined(TARGET_sh2eb)
+ #include <elf/sh.h>
+ #elif defined(TARGET_sparc)
+ #include <elf/sparc.h>
+@@ -108,8 +108,10 @@
+ #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)
+@@ -1309,7 +1311,7 @@
+ #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);
+@@ -1320,7 +1322,7 @@
+ 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)