re PR debug/66691 (ICE on valid code at -O3 with -g enabled in simplify_subreg, at...
[gcc.git] / gcc / config.gcc
index 0af4a1a851c41f9ac93196252ee52adf462df1d0..2b3af82be940dae3200681e629b3e4f1ca3b7326 100644 (file)
@@ -1,5 +1,5 @@
 # GCC target-specific configuration file.
-# Copyright (C) 1997-2014 Free Software Foundation, Inc.
+# Copyright (C) 1997-2015 Free Software Foundation, Inc.
 
 #This file is part of GCC.
 
@@ -259,7 +259,6 @@ case ${target} in
    arm*-wince-pe*                      \
  | arm*-*-ecos-elf                     \
  | arm*-*-elf                          \
- | arm*-*-freebsd*                     \
  | arm*-*-linux*                       \
  | arm*-*-uclinux*                     \
  | i[34567]86-go32-*                   \
@@ -303,7 +302,7 @@ m32c*-*-*)
 aarch64*-*-*)
        cpu_type=aarch64
        extra_headers="arm_neon.h arm_acle.h"
-       extra_objs="aarch64-builtins.o aarch-common.o"
+       extra_objs="aarch64-builtins.o aarch-common.o cortex-a57-fma-steering.o"
        target_gtfiles="\$(srcdir)/config/aarch64/aarch64-builtins.c"
        target_has_targetm_common=yes
        ;;
@@ -319,18 +318,18 @@ arc*-*-*)
        ;;
 arm*-*-*)
        cpu_type=arm
-       extra_objs="aarch-common.o"
+       extra_objs="arm-builtins.o aarch-common.o"
        extra_headers="mmintrin.h arm_neon.h arm_acle.h"
        target_type_format_char='%'
        c_target_objs="arm-c.o"
        cxx_target_objs="arm-c.o"
        extra_options="${extra_options} arm/arm-tables.opt"
+       target_gtfiles="\$(srcdir)/config/arm/arm-builtins.c"
        ;;
 avr-*-*)
        cpu_type=avr
        c_target_objs="avr-c.o"
        cxx_target_objs="avr-c.o"
-       extra_options="${extra_options} avr/avr-tables.opt"
        ;;
 bfin*-*)
        cpu_type=bfin
@@ -341,6 +340,9 @@ crisv32-*)
 frv*)  cpu_type=frv
        extra_options="${extra_options} g.opt"
        ;;
+ft32*) cpu_type=ft32
+       target_has_targetm_common=no
+       ;;
 moxie*)        cpu_type=moxie
        target_has_targetm_common=no
        ;;
@@ -366,7 +368,9 @@ i[34567]86-*-*)
                       avx512cdintrin.h avx512erintrin.h avx512pfintrin.h
                       shaintrin.h clflushoptintrin.h xsavecintrin.h
                       xsavesintrin.h avx512dqintrin.h avx512bwintrin.h
-                      avx512vlintrin.h avx512vlbwintrin.h avx512vldqintrin.h"
+                      avx512vlintrin.h avx512vlbwintrin.h avx512vldqintrin.h
+                      avx512ifmaintrin.h avx512ifmavlintrin.h avx512vbmiintrin.h
+                      avx512vbmivlintrin.h clwbintrin.h pcommitintrin.h mwaitxintrin.h"
        ;;
 x86_64-*-*)
        cpu_type=i386
@@ -385,7 +389,9 @@ x86_64-*-*)
                       avx512cdintrin.h avx512erintrin.h avx512pfintrin.h
                       shaintrin.h clflushoptintrin.h xsavecintrin.h
                       xsavesintrin.h avx512dqintrin.h avx512bwintrin.h
-                      avx512vlintrin.h avx512vlbwintrin.h avx512vldqintrin.h"
+                      avx512vlintrin.h avx512vlbwintrin.h avx512vldqintrin.h
+                      avx512ifmaintrin.h avx512ifmavlintrin.h avx512vbmiintrin.h
+                      avx512vbmivlintrin.h clwbintrin.h pcommitintrin.h mwaitxintrin.h"
        ;;
 ia64-*-*)
        extra_headers=ia64intrin.h
@@ -451,7 +457,7 @@ spu*-*-*)
 s390*-*-*)
        cpu_type=s390
        extra_options="${extra_options} fused-madd.opt"
-       extra_headers="s390intrin.h htmintrin.h htmxlintrin.h"
+       extra_headers="s390intrin.h htmintrin.h htmxlintrin.h vecintrin.h"
        ;;
 # Note the 'l'; we need to be able to match e.g. "shle" or "shl".
 sh[123456789lbe]*-*-* | sh-*-*)
@@ -572,7 +578,7 @@ case ${target} in
 esac
 
 # Common C libraries.
-tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3"
+tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3 LIBC_MUSL=4"
 
 # 32-bit x86 processors supported by --with-arch=.  Each processor
 # MUST be separated by exactly one space.
@@ -586,7 +592,8 @@ pentium4 pentium4m pentiumpro prescott"
 x86_64_archs="amdfam10 athlon64 athlon64-sse3 barcelona bdver1 bdver2 \
 bdver3 bdver4 btver1 btver2 k8 k8-sse3 opteron opteron-sse3 nocona \
 core2 corei7 corei7-avx core-avx-i core-avx2 atom slm nehalem westmere \
-sandybridge ivybridge haswell broadwell bonnell silvermont x86-64 native"
+sandybridge ivybridge haswell broadwell bonnell silvermont knl x86-64 \
+native"
 
 # Additional x86 processors supported by --with-cpu=.  Each processor
 # MUST be separated by exactly one space.
@@ -601,9 +608,12 @@ case ${target} in
   *-*-darwin9*)
     tm_file="${tm_file} darwin9.h"
     ;;
-  *-*-darwin[12][0-9]*)
+  *-*-darwin[1][01]*)
     tm_file="${tm_file} darwin9.h darwin10.h"
     ;;
+  *-*-darwin[1][2-9]* | *-*-darwin[2][0-9]*)
+    tm_file="${tm_file} darwin9.h darwin10.h darwin12.h"
+    ;;
   esac
   tm_file="${tm_file} ${cpu_type}/darwin.h"
   tm_p_file="${tm_p_file} darwin-protos.h"
@@ -660,6 +670,11 @@ case ${target} in
   gas=yes
   gnu_ld=yes
   fbsd_major=`echo ${target} | sed -e 's/.*freebsd//g' | sed -e 's/\..*//g'`
+  if test "$fbsd_major" = ""; then
+    echo "Specify the major version number of the targeted FreeBSD release"
+    echo "like this: --target=amd64-unknown-freebsd10.1"
+    exit 1
+  fi
   tm_defines="${tm_defines} FBSD_MAJOR=${fbsd_major}"
   tmake_file="t-slibgcc"
   case ${enable_threads} in
@@ -716,6 +731,9 @@ case ${target} in
     *-*-*uclibc*)
       tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC"
       ;;
+    *-*-*musl*)
+      tm_defines="$tm_defines DEFAULT_LIBC=LIBC_MUSL"
+      ;;
     *)
       tm_defines="$tm_defines DEFAULT_LIBC=LIBC_GLIBC"
       ;;
@@ -1004,6 +1022,27 @@ arm-wrs-vxworks)
        extra_options="${extra_options} arm/vxworks.opt"
        tmake_file="${tmake_file} arm/t-arm arm/t-vxworks"
        ;;
+arm*-*-freebsd*)                # ARM FreeBSD EABI
+       tm_file="dbxelf.h elfos.h ${fbsd_tm_file} arm/elf.h"
+       case $target in
+       arm*b-*-freebsd*)
+           tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
+           ;;
+       esac
+       tmake_file="${tmake_file} arm/t-arm arm/t-bpabi"
+       tm_file="${tm_file} arm/bpabi.h arm/freebsd.h arm/aout.h arm/arm.h"
+       case $target in
+       armv6*-*-freebsd*)
+           tm_defines="${tm_defines} TARGET_FREEBSD_ARMv6=1"
+           ;;
+       esac
+       case $target in
+       arm*hf-*-freebsd*)
+           tm_defines="${tm_defines} TARGET_FREEBSD_ARM_HARD_FLOAT=1"
+           ;;
+       esac
+       with_tls=${with_tls:-gnu}
+       ;;
 arm*-*-netbsdelf*)
        tm_file="dbxelf.h elfos.h netbsd.h netbsd-elf.h arm/elf.h arm/aout.h ${tm_file} arm/netbsd-elf.h"
        extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
@@ -1051,8 +1090,8 @@ arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtems*)
          use_gcc_stdint=wrap
          ;;
        arm*-*-rtems*)
-         tm_file="${tm_file} rtems.h arm/rtems-eabi.h newlib-stdint.h"
-         tmake_file="${tmake_file} arm/t-bpabi arm/t-rtems-eabi"
+         tm_file="${tm_file} rtems.h arm/rtems.h newlib-stdint.h"
+         tmake_file="${tmake_file} arm/t-bpabi arm/t-rtems"
          ;;
        arm*-*-symbianelf*)
          tm_file="${tm_file} arm/symbian.h"
@@ -1064,13 +1103,14 @@ arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtems*)
        tm_file="${tm_file} arm/aout.h vxworks-dummy.h arm/arm.h"
        ;;
 avr-*-rtems*)
-       tm_file="elfos.h avr/elf.h avr/avr-arch.h avr/avr.h dbxelf.h avr/rtems.h rtems.h newlib-stdint.h"
+       tm_file="elfos.h avr/elf.h avr/avr-arch.h avr/avr.h avr/specs.h dbxelf.h avr/rtems.h rtems.h newlib-stdint.h"
+       tm_defines="${tm_defines} WITH_RTEMS"
        tmake_file="${tmake_file} avr/t-avr avr/t-multilib avr/t-rtems"
        extra_gcc_objs="driver-avr.o avr-devices.o"
        extra_objs="avr-devices.o avr-log.o"
        ;;
 avr-*-*)
-       tm_file="elfos.h avr/elf.h avr/avr-arch.h avr/avr.h dbxelf.h avr/avr-stdint.h"
+       tm_file="elfos.h avr/elf.h avr/avr-arch.h avr/avr.h avr/specs.h dbxelf.h avr/avr-stdint.h"
        if test x${with_avrlibc} != xno; then
            tm_file="${tm_file} ${cpu_type}/avrlibc.h"
            tm_defines="${tm_defines} WITH_AVRLIBC"
@@ -1092,7 +1132,7 @@ bfin*-uclinux*)
        ;;
 bfin*-linux-uclibc*)
        tm_file="${tm_file} dbxelf.h elfos.h bfin/elf.h gnu-user.h linux.h glibc-stdint.h bfin/linux.h ./linux-sysroot-suffix.h"
-       tmake_file="bfin/t-bfin-linux t-slibgcc t-linux"
+       tmake_file="${tmake_file} bfin/t-bfin-linux"
        use_collect2=no
        ;;
 bfin*-rtems*)
@@ -1157,6 +1197,12 @@ frv-*-*linux*)
                 gnu-user.h linux.h glibc-stdint.h frv/linux.h"
        tmake_file="${tmake_file} frv/t-frv frv/t-linux"
        ;;
+ft32-*-elf)
+       gas=yes
+       gnu_ld=yes
+       tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
+       tmake_file="${tmake_file} ft32/t-ft32"
+       ;;
 moxie-*-elf)
        gas=yes
        gnu_ld=yes
@@ -1187,6 +1233,10 @@ h8300-*-elf*)
        tmake_file="h8300/t-h8300"
        tm_file="h8300/h8300.h dbxelf.h elfos.h newlib-stdint.h h8300/elf.h"
        ;;
+h8300-*-linux*)
+       tmake_file="${tmake_file} h8300/t-h8300 h8300/t-linux"
+       tm_file="h8300/h8300.h dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h h8300/linux.h"
+       ;;
 hppa*64*-*-linux*)
        target_cpu_default="MASK_PA_11|MASK_PA_20"
        tm_file="pa/pa64-start.h ${tm_file} dbxelf.h elfos.h gnu-user.h linux.h \
@@ -1339,6 +1389,9 @@ x86_64-*-darwin*)
        tmake_file="${tmake_file} ${cpu_type}/t-darwin64 t-slibgcc"
        tm_file="${tm_file} ${cpu_type}/darwin64.h"
        ;;
+i[34567]86-*-elfiamcu)
+       tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/iamcu.h"
+       ;;
 i[34567]86-*-elf*)
        tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h"
        ;;
@@ -1404,8 +1457,14 @@ i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu | i
        i[34567]86-*-linux*)
                tm_file="${tm_file} linux.h linux-android.h"
                extra_options="${extra_options} linux-android.opt"
-               # Assume modern glibc
-               default_gnu_indirect_function=yes
+               # Assume modern glibc if not targeting Android nor uclibc.
+               case ${target} in
+               *-*-*android*|*-*-*uclibc*)
+                 ;;
+               *)
+                 default_gnu_indirect_function=yes
+                 ;;
+               esac
                if test x$enable_targets = xall; then
                        tm_file="${tm_file} i386/x86-64.h i386/gnu-user-common.h i386/gnu-user64.h i386/linux-common.h i386/linux64.h"
                        tm_defines="${tm_defines} TARGET_BI_ARCH=1"
@@ -1467,14 +1526,20 @@ x86_64-*-linux* | x86_64-*-kfreebsd*-gnu | x86_64-*-knetbsd*-gnu)
        x86_64-*-linux*)
                tm_file="${tm_file} linux.h linux-android.h i386/linux-common.h i386/linux64.h"
                extra_options="${extra_options} linux-android.opt"
-               # Assume modern glibc
-               default_gnu_indirect_function=yes
+               # Assume modern glibc if not targeting Android nor uclibc.
+               case ${target} in
+               *-*-*android*|*-*-*uclibc*)
+                 ;;
+               *)
+                 default_gnu_indirect_function=yes
+                 ;;
+               esac
                ;;
        x86_64-*-kfreebsd*-gnu)
                tm_file="${tm_file} kfreebsd-gnu.h i386/kfreebsd-gnu64.h"
                ;;
        x86_64-*-knetbsd*-gnu)
-               tm_file="${tm_file} knetbsd-gnu.h"
+               tm_file="${tm_file} knetbsd-gnu.h i386/knetbsd-gnu64.h"
                ;;
        esac
        tmake_file="${tmake_file} i386/t-linux64"
@@ -1943,6 +2008,14 @@ mips*-*-netbsd*)                 # NetBSD/mips, either endian.
        tm_file="elfos.h ${tm_file} mips/elf.h netbsd.h netbsd-elf.h mips/netbsd.h"
        extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
        ;;
+mips*-img-linux*)
+       tm_file="dbxelf.h elfos.h gnu-user.h linux.h linux-android.h glibc-stdint.h ${tm_file} mips/gnu-user.h mips/linux.h mips/linux-common.h mips/mti-linux.h"
+       extra_options="${extra_options} linux-android.opt"
+       tmake_file="${tmake_file} mips/t-img-linux"
+       tm_defines="${tm_defines} MIPS_ISA_DEFAULT=37 MIPS_ABI_DEFAULT=ABI_32"
+       gnu_ld=yes
+       gas=yes
+       ;;
 mips*-mti-linux*)
        tm_file="dbxelf.h elfos.h gnu-user.h linux.h linux-android.h glibc-stdint.h ${tm_file} mips/gnu-user.h mips/linux.h mips/linux-common.h mips/mti-linux.h"
        extra_options="${extra_options} linux-android.opt"
@@ -1955,6 +2028,9 @@ mips*-*-linux*)                           # Linux MIPS, either endian.
        tm_file="dbxelf.h elfos.h gnu-user.h linux.h linux-android.h glibc-stdint.h ${tm_file} mips/gnu-user.h mips/linux.h mips/linux-common.h"
        extra_options="${extra_options} linux-android.opt"
        case ${target} in
+               mipsisa32r6*)
+                       default_mips_arch=mips32r6
+                       ;;
                mipsisa32r2*)
                        default_mips_arch=mips32r2
                        ;;
@@ -1973,6 +2049,11 @@ mips*-*-linux*)                          # Linux MIPS, either endian.
                        target_cpu_default=MASK_SOFT_FLOAT_ABI
                        enable_mips_multilibs="yes"
                        ;;
+               mipsisa64r6*-*-linux*)
+                       default_mips_abi=n32
+                       default_mips_arch=mips64r6
+                       enable_mips_multilibs="yes"
+                       ;;
                mipsisa64r2*-*-linux*)
                        default_mips_abi=n32
                        default_mips_arch=mips64r2
@@ -1995,6 +2076,11 @@ mips*-mti-elf*)
        tmake_file="mips/t-mti-elf"
        tm_defines="${tm_defines} MIPS_ISA_DEFAULT=33 MIPS_ABI_DEFAULT=ABI_32"
        ;;
+mips*-img-elf*)
+       tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h mips/n32-elf.h mips/sde.h mips/mti-elf.h"
+       tmake_file="mips/t-img-elf"
+       tm_defines="${tm_defines} MIPS_ISA_DEFAULT=37 MIPS_ABI_DEFAULT=ABI_32"
+       ;;
 mips*-sde-elf*)
        tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h mips/n32-elf.h mips/sde.h"
        tmake_file="mips/t-sde"
@@ -2015,12 +2101,18 @@ mips*-sde-elf*)
            ;;
        esac
        case ${target} in
+         mipsisa32r6*)
+           tm_defines="MIPS_ISA_DEFAULT=37 MIPS_ABI_DEFAULT=ABI_32"
+           ;;
          mipsisa32r2*)
            tm_defines="MIPS_ISA_DEFAULT=33 MIPS_ABI_DEFAULT=ABI_32"
            ;;
          mipsisa32*)
            tm_defines="MIPS_ISA_DEFAULT=32 MIPS_ABI_DEFAULT=ABI_32"
            ;;
+         mipsisa64r6*)
+           tm_defines="MIPS_ISA_DEFAULT=69 MIPS_ABI_DEFAULT=ABI_N32"
+           ;;
          mipsisa64r2*)
            tm_defines="MIPS_ISA_DEFAULT=65 MIPS_ABI_DEFAULT=ABI_N32"
            ;;
@@ -2031,17 +2123,25 @@ mips*-sde-elf*)
        ;;
 mipsisa32-*-elf* | mipsisa32el-*-elf* | \
 mipsisa32r2-*-elf* | mipsisa32r2el-*-elf* | \
+mipsisa32r6-*-elf* | mipsisa32r6el-*-elf* | \
 mipsisa64-*-elf* | mipsisa64el-*-elf* | \
-mipsisa64r2-*-elf* | mipsisa64r2el-*-elf*)
+mipsisa64r2-*-elf* | mipsisa64r2el-*-elf* | \
+mipsisa64r6-*-elf* | mipsisa64r6el-*-elf*)
        tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h"
        tmake_file="mips/t-isa3264"
        case ${target} in
+         mipsisa32r6*)
+           tm_defines="${tm_defines} MIPS_ISA_DEFAULT=37"
+           ;;
          mipsisa32r2*)
            tm_defines="${tm_defines} MIPS_ISA_DEFAULT=33"
            ;;
          mipsisa32*)
            tm_defines="${tm_defines} MIPS_ISA_DEFAULT=32"
            ;;
+         mipsisa64r6*)
+           tm_defines="${tm_defines} MIPS_ISA_DEFAULT=69"
+           ;;
          mipsisa64r2*)
            tm_defines="${tm_defines} MIPS_ISA_DEFAULT=65"
            ;;
@@ -2160,6 +2260,10 @@ nios2-*-*)
 nvptx-*)
        tm_file="${tm_file} newlib-stdint.h"
        tmake_file="nvptx/t-nvptx"
+       if test x$enable_as_accelerator = xyes; then
+               extra_programs="${extra_programs} mkoffload\$(exeext)"
+               tm_file="${tm_file} nvptx/offload.h"
+       fi
        ;;
 pdp11-*-*)
        tm_file="${tm_file} newlib-stdint.h"
@@ -2262,28 +2366,33 @@ powerpc-*-rtems*)
 powerpc*-*-linux*)
        tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h freebsd-spec.h rs6000/sysv4.h"
        extra_options="${extra_options} rs6000/sysv4.opt"
-       tmake_file="rs6000/t-fprules rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm"
+       tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-ppccomm"
        extra_objs="$extra_objs rs6000-linux.o"
        case ${target} in
            powerpc*le-*-*)
                tm_file="${tm_file} rs6000/sysv4le.h" ;;
        esac
-       maybe_biarch=yes
+       case ${target}:${with_cpu} in
+           powerpc64*: | powerpc64*:native) cpu_is_64bit=yes ;;
+       esac
+       maybe_biarch=${cpu_is_64bit}
+       case ${enable_targets} in
+           *powerpc64*) maybe_biarch=yes ;;
+           all) maybe_biarch=yes ;;
+       esac
        case ${target} in
            powerpc64*-*-linux*spe* | powerpc64*-*-linux*paired*)
-               echo "*** Configuration ${target} not supported" 1>&2
+               echo "*** Configuration ${target} not supported" 1>&2
                exit 1
                ;;
            powerpc*-*-linux*spe* | powerpc*-*-linux*paired*)
                maybe_biarch=
                ;;
-           powerpc64*-*-linux*)
-               test x$with_cpu != x || cpu_is_64bit=yes
-               maybe_biarch=always
-               ;;
        esac
-       case ${maybe_biarch}:${enable_targets}:${cpu_is_64bit} in
-           always:* | yes:*powerpc64* | yes:all:* | yes:*:yes)
+       case ${target}:${enable_targets}:${maybe_biarch} in
+           powerpc64-* | powerpc-*:*:yes | *:*powerpc64-*:yes | *:all:yes \
+           | powerpc64le*:*powerpcle* | powerpc64le*:*powerpc-* \
+           | powerpcle-*:*powerpc64le*:yes)
                if test x$cpu_is_64bit = xyes; then
                    tm_file="${tm_file} rs6000/default64.h"
                fi
@@ -2304,9 +2413,14 @@ powerpc*-*-linux*)
                esac
                extra_options="${extra_options} rs6000/linux64.opt"
                ;;
+           powerpc64*)
+               tm_file="${tm_file} rs6000/default64.h rs6000/linux64.h glibc-stdint.h"
+               extra_options="${extra_options} rs6000/linux64.opt"
+               tmake_file="${tmake_file} rs6000/t-linux"
+               ;;
            *)
                tm_file="${tm_file} rs6000/linux.h glibc-stdint.h"
-               tmake_file="$tmake_file rs6000/t-linux"
+               tmake_file="${tmake_file} rs6000/t-ppcos rs6000/t-linux"
                ;;
        esac
        case ${target} in
@@ -2428,27 +2542,35 @@ rx-*-elf*)
 s390-*-linux*)
        default_gnu_indirect_function=yes
        tm_file="s390/s390.h dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h s390/linux.h"
+       c_target_objs="${c_target_objs} s390-c.o"
+       cxx_target_objs="${cxx_target_objs} s390-c.o"
        if test x$enable_targets = xall; then
                tmake_file="${tmake_file} s390/t-linux64"
        fi
+       tmake_file="${tmake_file} s390/t-s390"
        ;;
 s390x-*-linux*)
        default_gnu_indirect_function=yes
        tm_file="s390/s390x.h s390/s390.h dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h s390/linux.h"
        tm_p_file="linux-protos.h s390/s390-protos.h"
+       c_target_objs="${c_target_objs} s390-c.o"
+       cxx_target_objs="${cxx_target_objs} s390-c.o"
        md_file=s390/s390.md
        extra_modes=s390/s390-modes.def
        out_file=s390/s390.c
-       tmake_file="${tmake_file} s390/t-linux64"
+       tmake_file="${tmake_file} s390/t-linux64 s390/t-s390"
        ;;
 s390x-ibm-tpf*)
-        tm_file="s390/s390x.h s390/s390.h dbxelf.h elfos.h s390/tpf.h"
-        tm_p_file=s390/s390-protos.h
-        md_file=s390/s390.md
-        extra_modes=s390/s390-modes.def
-        out_file=s390/s390.c
-        thread_file='tpf'
+       tm_file="s390/s390x.h s390/s390.h dbxelf.h elfos.h s390/tpf.h"
+       tm_p_file=s390/s390-protos.h
+       c_target_objs="${c_target_objs} s390-c.o"
+       cxx_target_objs="${cxx_target_objs} s390-c.o"
+       md_file=s390/s390.md
+       extra_modes=s390/s390-modes.def
+       out_file=s390/s390.c
+       thread_file='tpf'
        extra_options="${extra_options} s390/tpf.opt"
+       tmake_file="${tmake_file} s390/t-s390"
        ;;
 sh-*-elf* | sh[12346l]*-*-elf* | \
   sh-*-linux* | sh[2346lbe]*-*-linux* | \
@@ -2831,10 +2953,14 @@ vax-*-netbsdelf*)
        extra_options="${extra_options} netbsd.opt netbsd-elf.opt vax/elf.opt"
        ;;
 vax-*-openbsd*)
-       tm_file="vax/vax.h vax/openbsd1.h openbsd.h openbsd-stdint.h openbsd-pthread.h vax/openbsd.h"
+       tm_file="vax/vax.h vax/openbsd1.h openbsd.h openbsd-stdint.h openbsd-libpthread.h vax/openbsd.h"
        extra_options="${extra_options} openbsd.opt"
        use_collect2=yes
        ;;
+visium-*-elf*)
+       tm_file="dbxelf.h elfos.h ${tm_file} visium/elf.h newlib-stdint.h"
+       tmake_file="visium/t-visium visium/t-crtstuff"
+       ;;
 xstormy16-*-elf)
        # For historical reasons, the target files omit the 'x'.
        tm_file="dbxelf.h elfos.h newlib-stdint.h stormy16/stormy16.h"
@@ -2884,6 +3010,14 @@ powerpc*-*-* | rs6000-*-*)
        tm_file="${tm_file} rs6000/option-defaults.h"
 esac
 
+# Build mkoffload tool
+case ${target} in
+*-intelmic-* | *-intelmicemul-*)
+       tmake_file="${tmake_file} i386/t-intelmic"
+       tm_file="${tm_file} i386/intelmic-offload.h"
+       ;;
+esac
+
 if [ "$target_has_targetcm" = "no" ]; then
   c_target_objs="$c_target_objs default-c.o"
   cxx_target_objs="$cxx_target_objs default-c.o"
@@ -3913,7 +4047,7 @@ case "${target}" in
                ;;
 
        powerpc*-*-* | rs6000-*-*)
-               supported_defaults="abi cpu cpu_32 cpu_64 float tune tune_32 tune_64"
+               supported_defaults="abi cpu cpu_32 cpu_64 float tune tune_32 tune_64 advance_toolchain"
 
                for which in cpu cpu_32 cpu_64 tune tune_32 tune_64; do
                        eval "val=\$with_$which"
@@ -3960,6 +4094,56 @@ case "${target}" in
                        exit 1
                        ;;
                esac
+
+               if test "x$with_advance_toolchain" != x; then
+                   if test -d "/opt/$with_advance_toolchain/." -a \
+                       -d "/opt/$with_advance_toolchain/bin/." -a \
+                       -d "/opt/$with_advance_toolchain/include/."; then
+
+                       tm_file="$tm_file ./advance-toolchain.h"
+                       (at="/opt/$with_advance_toolchain"
+                        echo "/* Use Advance Toolchain $at */"
+                        echo
+                        echo "#ifndef USE_AT_INCLUDE_FILES"
+                        echo "#define USE_AT_INCLUDE_FILES 1"
+                        echo "#endif"
+                        echo
+                        echo "#if USE_AT_INCLUDE_FILES"
+                        echo "#undef  INCLUDE_EXTRA_SPEC"
+                        echo "#define INCLUDE_EXTRA_SPEC" \
+                             "\"-isystem $at/include\""
+                        echo "#endif"
+                        echo
+                        echo "#undef  LINK_OS_EXTRA_SPEC32"
+                        echo "#define LINK_OS_EXTRA_SPEC32" \
+                             "\"%(link_os_new_dtags)" \
+                             "-rpath $prefix/lib -rpath $at/lib" \
+                             "-L $prefix/lib -L $at/lib\""
+                        echo
+                        echo "#undef  LINK_OS_EXTRA_SPEC64"
+                        echo "#define LINK_OS_EXTRA_SPEC64" \
+                             "\"%(link_os_new_dtags)" \
+                             "-rpath $prefix/lib64 -rpath $at/lib64" \
+                             "-L $prefix/lib64 -L $at/lib64\""
+                        echo
+                        echo "#undef  LINK_OS_NEW_DTAGS_SPEC"
+                        echo "#define LINK_OS_NEW_DTAGS_SPEC" \
+                             "\"--enable-new-dtags\""
+                        echo
+                        echo "#undef  DYNAMIC_LINKER_PREFIX"
+                        echo "#define DYNAMIC_LINKER_PREFIX \"$at\""
+                        echo
+                        echo "#undef  MD_EXEC_PREFIX"
+                        echo "#define MD_EXEC_PREFIX \"$at/bin/\""
+                        echo
+                        echo "#undef  MD_STARTFILE_PREFIX"
+                        echo "#define MD_STARTFILE_PREFIX \"$at/lib/\"") \
+                           > advance-toolchain.h
+                   else
+                       echo "Unknown advance-toolchain $with_advance_toolchain"
+                       exit 1
+                   fi
+               fi
                ;;
 
        s390*-*-*)
@@ -3968,7 +4152,7 @@ case "${target}" in
                for which in arch tune; do
                        eval "val=\$with_$which"
                        case ${val} in
-                       "" | g5 | g6 | z900 | z990 | z9-109 | z9-ec | z10 | z196 | zEC12)
+                       "" | native | g5 | g6 | z900 | z990 | z9-109 | z9-ec | z10 | z196 | zEC12 | z13)
                                # OK
                                ;;
                        *)
@@ -4167,8 +4351,10 @@ case ${target} in
                    mips4)    tm_defines="$tm_defines MIPS_ISA_DEFAULT=4" ;;
                    mips32)   tm_defines="$tm_defines MIPS_ISA_DEFAULT=32" ;;
                    mips32r2) tm_defines="$tm_defines MIPS_ISA_DEFAULT=33" ;;
+                   mips32r6) tm_defines="$tm_defines MIPS_ISA_DEFAULT=37" ;;
                    mips64)   tm_defines="$tm_defines MIPS_ISA_DEFAULT=64" ;;
                    mips64r2) tm_defines="$tm_defines MIPS_ISA_DEFAULT=65" ;;
+                   mips64r6) tm_defines="$tm_defines MIPS_ISA_DEFAULT=69" ;;
                esac
                case ${default_mips_abi} in
                    32)   tm_defines="$tm_defines MIPS_ABI_DEFAULT=ABI_32" ;;
@@ -4279,3 +4465,11 @@ then
                target_cpu_default=$target_cpu_default2
        fi
 fi
+
+case ${target} in
+i[34567]86-*-* | x86_64-*-*)
+       if test x$enable_as_accelerator = xyes; then
+               extra_programs="mkoffload\$(exeext)"
+       fi
+       ;;
+esac