瀏覽代碼

fr-v: allow to build gcc 6.1 linux toolchain

Waldemar Brodkorb 8 年之前
父節點
當前提交
2192c1d959

+ 1 - 0
target/config/Config.in.compiler

@@ -26,6 +26,7 @@ default ADK_TOOLCHAIN_GCC_6_1_0 if ADK_TARGET_ARCH_XTENSA
 default ADK_TOOLCHAIN_GCC_6_1_0 if ADK_TARGET_ARCH_BFIN
 default ADK_TOOLCHAIN_GCC_6_1_0 if ADK_TARGET_ARCH_C6X
 default ADK_TOOLCHAIN_GCC_6_1_0 if ADK_TARGET_ARCH_H8300
+default ADK_TOOLCHAIN_GCC_6_1_0 if ADK_TARGET_ARCH_FRV
 default ADK_TOOLCHAIN_GCC_6_1_0 if ADK_TARGET_CPU_MIPS_MIPS32R6 || ADK_TARGET_CPU_MIPS64_MIPS64R6
 default ADK_TOOLCHAIN_GCC_5_4_0
 

+ 1 - 9
target/frv/kernel/sim-frv

@@ -2,12 +2,4 @@ CONFIG_FRV=y
 CONFIG_CPU_FR401=y
 CONFIG_UCPAGE_OFFSET_20000000=y
 CONFIG_BUG=y
-CONFIG_FRV_ONCPU_SERIAL=y
-CONFIG_SERIAL_EARLYCON=y
-CONFIG_SERIAL_8250=y
-CONFIG_SERIAL_8250_DEPRECATED_OPTIONS=y
-CONFIG_SERIAL_8250_CONSOLE=y
-CONFIG_SERIAL_8250_DMA=y
-CONFIG_SERIAL_8250_PCI=y
-CONFIG_SERIAL_8250_NR_UARTS=32
-CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+CONFIG_SECTION_MISMATCH_WARN_ONLY=y

+ 1 - 0
target/frv/systems/sim-frv

@@ -2,6 +2,7 @@ config ADK_TARGET_SYSTEM_SIM_FRV
 	bool "GDB simulator"
 	select ADK_TARGET_CPU_FRV
 	select ADK_TARGET_SIM
+	select ADK_TARGET_WITH_PCI
 	select ADK_TARGET_PACKAGE_TXZ
 	help
 	  FRV Simulator.

+ 12 - 0
toolchain/gcc/patches/6.1.0/add-crtreloc.frv

@@ -0,0 +1,12 @@
+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-07-24 21:22:08.566253376 +0200
+@@ -27,7 +27,7 @@
+ 
+ #undef STARTFILE_SPEC
+ #define STARTFILE_SPEC \
+-  "%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \
++  "%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} crtreloc.o%s \
+    crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}"
+ 
+ #undef ENDFILE_SPEC

+ 12 - 0
toolchain/gcc/patches/6.1.0/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"