From 15ab9ca51d2f3b929a18c38da6c36df27ef1a729 Mon Sep 17 00:00:00 2001 From: haiqu Date: Tue, 19 May 2015 14:48:32 +1000 Subject: [PATCH] MIPS: Fix cross-tools build. Signed-off-by: Augustin Cavalier --- gcc/gcc/config.gcc | 11 ++++++++--- gcc/gcc/config.host | 9 +++++---- gcc/libgcc/config.host | 6 ++++-- 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/gcc/gcc/config.gcc b/gcc/gcc/config.gcc index 00a0bfb58f..20f2db8223 100644 --- a/gcc/gcc/config.gcc +++ b/gcc/gcc/config.gcc @@ -181,7 +181,7 @@ # the --with-sysroot configure option or the # --sysroot command line option is used this # will be relative to the sysroot. -# target_type_format_char +# target_type_format_char # The default character to be used for formatting # the attribute in a # .type symbol_name, ${t_t_f_c} @@ -1320,7 +1320,7 @@ i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu | i TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's/^,//'` need_64bit_isa=yes case X"${with_cpu}" in - Xgeneric|Xatom|Xcore2|Xcorei7|Xcorei7-avx|Xnocona|Xx86-64|Xbdver3|Xbdver2|Xbdver1|Xbtver2|Xbtver1|Xamdfam10|Xbarcelona|Xk8|Xopteron|Xathlon64|Xathlon-fx|Xathlon64-sse3|Xk8-sse3|Xopteron-sse3) + Xgeneric|Xatom|Xcore2|Xcorei7|Xcorei7-avx|Xnocona|Xx86-64|Xbdver3|Xbdver2|Xbdver1|Xbtver2|Xbtver1|Xamdfam10|Xbarcelona|Xk8|Xopteron|Xathlon64|Xathlon-fx|Xathlon64-sse3|Xk8-sse3|Xopteron-sse3) ;; X) if test x$with_cpu_64 = x; then @@ -1841,6 +1841,11 @@ mips*-mti-linux*) gas=yes test x$with_llsc != x || with_llsc=yes ;; +mipsel-*-haiku*) + target_cpu_default="MASK_ABICALLS" + tm_file="elfos.h ${tm_file} haiku.h mips/haiku.h" + tmake_file="${tmake_file} mips/t-elf t-haiku" + ;; mips64*-*-linux* | mipsisa64*-*-linux*) tm_file="dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h ${tm_file} mips/gnu-user.h mips/gnu-user64.h mips/linux64.h mips/linux-common.h" tmake_file="${tmake_file} mips/t-linux64" @@ -3035,7 +3040,7 @@ if test x$with_cpu = x ; then with_cpu=8548 else with_cpu=8540 - fi + fi ;; sparc*-*-*) case ${target} in diff --git a/gcc/gcc/config.host b/gcc/gcc/config.host index be2ce52808..9b7d0d9925 100644 --- a/gcc/gcc/config.host +++ b/gcc/gcc/config.host @@ -61,7 +61,7 @@ # different from the default "liblto_plugin.so". # When setting any of these variables, check to see if a corresponding -# variable is present in config.build; if so, you will likely want to +# variable is present in config.build; if so, you will likely want to # set it in both places. # Default settings. @@ -126,12 +126,13 @@ case ${host} in ;; esac ;; - mips*-*-linux*) + mips*-*-linux* \ + | mips*-*-haiku* ) case ${target} in - mips*-*-linux*) + mips*-*-* ) host_extra_gcc_objs="driver-native.o" host_xmake_file="${host_xmake_file} mips/x-native" - ;; + ;; esac ;; rs6000-*-* \ diff --git a/gcc/libgcc/config.host b/gcc/libgcc/config.host index 933f09ac99..4489d79113 100644 --- a/gcc/libgcc/config.host +++ b/gcc/libgcc/config.host @@ -79,7 +79,7 @@ unwind_header=unwind-generic.h cpu_type=`echo ${host} | sed 's/-.*$//'` case ${host} in m32c*-*-*) - cpu_type=m32c + cpu_type=m32c tmake_file=t-fdpbit ;; aarch64*-*-*) @@ -124,7 +124,7 @@ lm32*-*-*) cpu_type=lm32 ;; m32r*-*-*) - cpu_type=m32r + cpu_type=m32r ;; m68k-*-*) ;; @@ -767,6 +767,8 @@ mips*-sde-elf*) esac extra_parts="$extra_parts crti.o crtn.o" ;; +mipsel-*-haiku*) + ;; mipsisa32-*-elf* | mipsisa32el-*-elf* | \ mipsisa32r2-*-elf* | mipsisa32r2el-*-elf* | \ mipsisa64-*-elf* | mipsisa64el-*-elf* | \