summaryrefslogtreecommitdiff
path: root/toolchain
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2016-02-05 23:02:00 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2016-02-05 23:02:00 +0100
commit6d2e9103d92790de1029e07fcb93099161fd61b6 (patch)
tree91e04c99e8a8bf98947e2fcd1c7ef20fbc387bb8 /toolchain
parent9f8bcf50e6be51766b95824e3dd58c4612dbecef (diff)
fr-v: allow to build a uClibc-ng toolchain
Diffstat (limited to 'toolchain')
-rw-r--r--toolchain/gcc/Makefile4
-rw-r--r--toolchain/gcc/patches/4.5.4/disable-dwarf.frv11
-rw-r--r--toolchain/gcc/patches/4.9.3/disable-dwarf.frv12
-rw-r--r--toolchain/gcc/patches/4.9.3/remove-write-macro.frv11
-rw-r--r--toolchain/gcc/patches/git/disable-dwarf.frv12
-rw-r--r--toolchain/gdb/Makefile3
6 files changed, 53 insertions, 0 deletions
diff --git a/toolchain/gcc/Makefile b/toolchain/gcc/Makefile
index db543ace1..dd7b73c0b 100644
--- a/toolchain/gcc/Makefile
+++ b/toolchain/gcc/Makefile
@@ -174,6 +174,10 @@ ifeq ($(ADK_TARGET_ARCH_PPC),y)
GCC_CONFOPTS+= --with-long-double-64 --enable-secureplt
endif
+ifeq ($(ADK_TARGET_ARCH_FRV),y)
+GCC_CONFOPTS+= --enable-sjlj-exceptions
+endif
+
ifneq ($(ADK_TARGET_MIPS_ABI),)
GCC_CONFOPTS+= --with-abi=${ADK_TARGET_MIPS_ABI}
endif
diff --git a/toolchain/gcc/patches/4.5.4/disable-dwarf.frv b/toolchain/gcc/patches/4.5.4/disable-dwarf.frv
new file mode 100644
index 000000000..ee4ca01a1
--- /dev/null
+++ b/toolchain/gcc/patches/4.5.4/disable-dwarf.frv
@@ -0,0 +1,11 @@
+diff -Nur gcc-4.5.4.orig/gcc/config/t-linux gcc-4.5.4/gcc/config/t-linux
+--- gcc-4.5.4.orig/gcc/config/t-linux 2009-04-21 21:03:23.000000000 +0200
++++ gcc-4.5.4/gcc/config/t-linux 2015-11-21 17:25:52.720653570 +0100
+@@ -27,6 +27,6 @@
+ SHLIB_MAPFILES += $(srcdir)/config/libgcc-glibc.ver
+
+ # Use unwind-dw2-fde-glibc
+-LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde-glibc.c \
++LIB2ADDEH = $(srcdir)/unwind-dw2.c \
+ $(srcdir)/unwind-sjlj.c $(srcdir)/gthr-gnat.c $(srcdir)/unwind-c.c
+ LIB2ADDEHDEP = unwind.inc unwind-dw2-fde.h unwind-dw2-fde.c
diff --git a/toolchain/gcc/patches/4.9.3/disable-dwarf.frv b/toolchain/gcc/patches/4.9.3/disable-dwarf.frv
new file mode 100644
index 000000000..c11baec92
--- /dev/null
+++ b/toolchain/gcc/patches/4.9.3/disable-dwarf.frv
@@ -0,0 +1,12 @@
+diff -Nur gcc-git.orig/libgcc/config.host gcc-git/libgcc/config.host
+--- gcc-git.orig/libgcc/config.host 2015-10-23 21:12:52.000000000 +0200
++++ gcc-git/libgcc/config.host 2015-11-15 21:17:38.385745887 +0100
+@@ -231,7 +231,7 @@
+ esac
+ ;;
+ *-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu | *-*-gnu* | *-*-kopensolaris*-gnu)
+- tmake_file="$tmake_file t-crtstuff-pic t-libgcc-pic t-eh-dw2-dip t-slibgcc t-slibgcc-gld t-slibgcc-elf-ver t-linux"
++ tmake_file="$tmake_file t-crtstuff-pic t-libgcc-pic t-slibgcc t-slibgcc-gld t-slibgcc-elf-ver t-linux"
+ extra_parts="crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o"
+ if test x$enable_vtable_verify = xyes; then
+ extra_parts="$extra_parts vtv_start.o vtv_end.o vtv_start_preinit.o vtv_end_preinit.o"
diff --git a/toolchain/gcc/patches/4.9.3/remove-write-macro.frv b/toolchain/gcc/patches/4.9.3/remove-write-macro.frv
new file mode 100644
index 000000000..24832b737
--- /dev/null
+++ b/toolchain/gcc/patches/4.9.3/remove-write-macro.frv
@@ -0,0 +1,11 @@
+diff -Nur gcc-4.9.3.orig/gcc/config/frv/linux.h gcc-4.9.3/gcc/config/frv/linux.h
+--- gcc-4.9.3.orig/gcc/config/frv/linux.h 2014-01-02 23:23:26.000000000 +0100
++++ gcc-4.9.3/gcc/config/frv/linux.h 2015-11-22 11:36:17.574727932 +0100
+@@ -69,6 +69,6 @@
+ #undef INVOKE__main
+
+ #undef Twrite
+-#define Twrite __write
++#define Twrite write
+
+ #endif /* __FRV_LINUX_H__ */
diff --git a/toolchain/gcc/patches/git/disable-dwarf.frv b/toolchain/gcc/patches/git/disable-dwarf.frv
new file mode 100644
index 000000000..c11baec92
--- /dev/null
+++ b/toolchain/gcc/patches/git/disable-dwarf.frv
@@ -0,0 +1,12 @@
+diff -Nur gcc-git.orig/libgcc/config.host gcc-git/libgcc/config.host
+--- gcc-git.orig/libgcc/config.host 2015-10-23 21:12:52.000000000 +0200
++++ gcc-git/libgcc/config.host 2015-11-15 21:17:38.385745887 +0100
+@@ -231,7 +231,7 @@
+ esac
+ ;;
+ *-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu | *-*-gnu* | *-*-kopensolaris*-gnu)
+- tmake_file="$tmake_file t-crtstuff-pic t-libgcc-pic t-eh-dw2-dip t-slibgcc t-slibgcc-gld t-slibgcc-elf-ver t-linux"
++ tmake_file="$tmake_file t-crtstuff-pic t-libgcc-pic t-slibgcc t-slibgcc-gld t-slibgcc-elf-ver t-linux"
+ extra_parts="crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o"
+ if test x$enable_vtable_verify = xyes; then
+ extra_parts="$extra_parts vtv_start.o vtv_end.o vtv_start_preinit.o vtv_end_preinit.o"
diff --git a/toolchain/gdb/Makefile b/toolchain/gdb/Makefile
index 821d9ad81..917aad655 100644
--- a/toolchain/gdb/Makefile
+++ b/toolchain/gdb/Makefile
@@ -56,6 +56,9 @@ ifeq ($(ADK_TARGET_SIM),y)
ifeq ($(ADK_TARGET_ARCH_BFIN),y)
$(INSTALL_BIN) $(GDB_BUILD_DIR)/sim/bfin/run $(TARGET_CROSS)run
endif
+ifeq ($(ADK_TARGET_ARCH_FRV),y)
+ $(INSTALL_BIN) $(WRKBUILD)/sim/frv/run $(TARGET_CROSS)run
+endif
ifeq ($(ADK_TARGET_ARCH_H8300),y)
$(INSTALL_BIN) $(GDB_BUILD_DIR)/sim/h8300/run $(TARGET_CROSS)run
endif