summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--target/config/Config.in.binutils4
-rw-r--r--toolchain/binutils/patches/2.27/frv.patch27
-rw-r--r--toolchain/gcc/patches/6.1.0/frv-remove-write-macro.patch52
3 files changed, 83 insertions, 0 deletions
diff --git a/target/config/Config.in.binutils b/target/config/Config.in.binutils
index 6c150c0a6..93079a374 100644
--- a/target/config/Config.in.binutils
+++ b/target/config/Config.in.binutils
@@ -11,6 +11,7 @@ default ADK_TOOLCHAIN_BINUTILS_2_26_1 if ADK_TARGET_ARCH_H8300
default ADK_TOOLCHAIN_BINUTILS_2_26_1 if ADK_TARGET_ARCH_M68K && !ADK_TARGET_CPU_CF
default ADK_TOOLCHAIN_BINUTILS_2_26_1 if ADK_TARGET_ARCH_MOXIE
default ADK_TOOLCHAIN_BINUTILS_2_26_1 if ADK_TARGET_ARCH_XTENSA
+default ADK_TOOLCHAIN_BINUTILS_2_26_1 if ADK_TARGET_ARCH_FRV
default ADK_TOOLCHAIN_BINUTILS_2_25_1
config ADK_TOOLCHAIN_BINUTILS_GIT
@@ -30,12 +31,14 @@ config ADK_TOOLCHAIN_BINUTILS_2_26_1
bool "2.26.1"
depends on !ADK_TARGET_ARCH_ARC
depends on !ADK_TARGET_ARCH_AVR32
+ depends on !ADK_TARGET_ARCH_FRV
depends on !ADK_TARGET_ARCH_NDS32
config ADK_TOOLCHAIN_BINUTILS_2_25_1
bool "2.25.1"
depends on !ADK_TARGET_ARCH_ARC
depends on !ADK_TARGET_ARCH_AVR32
+ depends on !ADK_TARGET_ARCH_FRV
depends on !ADK_TARGET_ARCH_H8300
depends on !ADK_TARGET_ARCH_MOXIE
depends on !ADK_TARGET_ARCH_NDS32
@@ -46,6 +49,7 @@ config ADK_TOOLCHAIN_BINUTILS_2_24
depends on !ADK_TARGET_ARCH_ARC
depends on !ADK_TARGET_ARCH_AVR32
depends on !ADK_TARGET_ARCH_CRIS
+ depends on !ADK_TARGET_ARCH_FRV
depends on !ADK_TARGET_ARCH_H8300
depends on !ADK_TARGET_ARCH_MOXIE
diff --git a/toolchain/binutils/patches/2.27/frv.patch b/toolchain/binutils/patches/2.27/frv.patch
new file mode 100644
index 000000000..4c378ad17
--- /dev/null
+++ b/toolchain/binutils/patches/2.27/frv.patch
@@ -0,0 +1,27 @@
+diff -Nur binutils-2.27.orig/bfd/elf32-frv.c binutils-2.27/bfd/elf32-frv.c
+--- binutils-2.27.orig/bfd/elf32-frv.c 2016-08-03 09:36:50.000000000 +0200
++++ binutils-2.27/bfd/elf32-frv.c 2016-08-16 14:04:27.941065290 +0200
+@@ -5723,10 +5723,6 @@
+ }
+ if (frvfdpic_got_section (info))
+ {
+- BFD_ASSERT (frvfdpic_gotrel_section (info)->size
+- == (frvfdpic_gotrel_section (info)->reloc_count
+- * sizeof (Elf32_External_Rel)));
+-
+ if (frvfdpic_gotfixup_section (info))
+ {
+ struct elf_link_hash_entry *hgot = elf_hash_table (info)->hgot;
+@@ -5766,12 +5762,6 @@
+ }
+ }
+ }
+- if (frvfdpic_pltrel_section (info))
+- {
+- BFD_ASSERT (frvfdpic_pltrel_section (info)->size
+- == (frvfdpic_pltrel_section (info)->reloc_count
+- * sizeof (Elf32_External_Rel)));
+- }
+
+
+ if (elf_hash_table (info)->dynamic_sections_created)
diff --git a/toolchain/gcc/patches/6.1.0/frv-remove-write-macro.patch b/toolchain/gcc/patches/6.1.0/frv-remove-write-macro.patch
new file mode 100644
index 000000000..db20d37d7
--- /dev/null
+++ b/toolchain/gcc/patches/6.1.0/frv-remove-write-macro.patch
@@ -0,0 +1,52 @@
+diff -Nur gcc-6.1.0.orig/gcc/config/frv/frv.h gcc-6.1.0/gcc/config/frv/frv.h
+--- gcc-6.1.0.orig/gcc/config/frv/frv.h 2016-01-04 15:30:50.000000000 +0100
++++ gcc-6.1.0/gcc/config/frv/frv.h 2016-08-16 13:31:32.652520944 +0200
+@@ -1350,11 +1350,8 @@
+ #define TRAMPOLINE_TEMPLATE_NAME "__trampoline_template"
+ #endif
+
+-#define Twrite _write
+-
+ #if ! __FRV_FDPIC__
+ #define TRANSFER_FROM_TRAMPOLINE \
+-extern int Twrite (int, const void *, unsigned); \
+ \
+ void \
+ __trampoline_setup (short * addr, int size, int fnaddr, int sc) \
+@@ -1366,8 +1363,6 @@
+ \
+ if (size < 20) \
+ { \
+- Twrite (2, "__trampoline_setup bad size\n", \
+- sizeof ("__trampoline_setup bad size\n") - 1); \
+ exit (-1); \
+ } \
+ \
+@@ -1397,7 +1392,6 @@
+ "\tjmpl @(gr0,gr6)\n");
+ #else
+ #define TRANSFER_FROM_TRAMPOLINE \
+-extern int Twrite (int, const void *, unsigned); \
+ \
+ void \
+ __trampoline_setup (addr, size, fnaddr, sc) \
+@@ -1414,8 +1408,6 @@
+ \
+ if (size != 32) \
+ { \
+- Twrite (2, "__trampoline_setup bad size\n", \
+- sizeof ("__trampoline_setup bad size\n") - 1); \
+ exit (-1); \
+ } \
+ \
+diff -Nur gcc-6.1.0.orig/gcc/config/frv/linux.h gcc-6.1.0/gcc/config/frv/linux.h
+--- gcc-6.1.0.orig/gcc/config/frv/linux.h 2016-01-04 15:30:50.000000000 +0100
++++ gcc-6.1.0/gcc/config/frv/linux.h 2016-08-16 13:31:06.763517719 +0200
+@@ -68,7 +68,4 @@
+
+ #undef INVOKE__main
+
+-#undef Twrite
+-#define Twrite __write
+-
+ #endif /* __FRV_LINUX_H__ */