configure.ac: Add aarch64-*-freebsd*.
[platform/upstream/gcc.git] / gcc / config.gcc
index f060e2f..7bbf546 100644 (file)
@@ -1,5 +1,5 @@
 # GCC target-specific configuration file.
-# Copyright (C) 1997-2015 Free Software Foundation, Inc.
+# Copyright (C) 1997-2016 Free Software Foundation, Inc.
 
 #This file is part of GCC.
 
@@ -236,7 +236,6 @@ md_file=
 
 # Obsolete configurations.
 case ${target} in
-# Currently there are no obsolete targets.
  nothing                               \
  )
     if test "x$enable_obsolete" != xyes; then
@@ -301,7 +300,7 @@ m32c*-*-*)
         ;;
 aarch64*-*-*)
        cpu_type=aarch64
-       extra_headers="arm_neon.h arm_acle.h"
+       extra_headers="arm_fp16.h arm_neon.h arm_acle.h"
        c_target_objs="aarch64-c.o"
        cxx_target_objs="aarch64-c.o"
        extra_objs="aarch64-builtins.o aarch-common.o cortex-a57-fma-steering.o"
@@ -317,11 +316,13 @@ am33_2.0-*-linux*)
        ;;
 arc*-*-*)
        cpu_type=arc
+       c_target_objs="arc-c.o"
+       cxx_target_objs="arc-c.o"
        ;;
 arm*-*-*)
        cpu_type=arm
        extra_objs="arm-builtins.o aarch-common.o"
-       extra_headers="mmintrin.h arm_neon.h arm_acle.h"
+       extra_headers="mmintrin.h arm_neon.h arm_acle.h arm_fp16.h"
        target_type_format_char='%'
        c_target_objs="arm-c.o"
        cxx_target_objs="arm-c.o"
@@ -372,7 +373,8 @@ i[34567]86-*-*)
                       xsavesintrin.h avx512dqintrin.h avx512bwintrin.h
                       avx512vlintrin.h avx512vlbwintrin.h avx512vldqintrin.h
                       avx512ifmaintrin.h avx512ifmavlintrin.h avx512vbmiintrin.h
-                      avx512vbmivlintrin.h clwbintrin.h pcommitintrin.h mwaitxintrin.h"
+                      avx512vbmivlintrin.h clwbintrin.h mwaitxintrin.h
+                      clzerointrin.h pkuintrin.h"
        ;;
 x86_64-*-*)
        cpu_type=i386
@@ -393,7 +395,8 @@ x86_64-*-*)
                       xsavesintrin.h avx512dqintrin.h avx512bwintrin.h
                       avx512vlintrin.h avx512vlbwintrin.h avx512vldqintrin.h
                       avx512ifmaintrin.h avx512ifmavlintrin.h avx512vbmiintrin.h
-                      avx512vbmivlintrin.h clwbintrin.h pcommitintrin.h mwaitxintrin.h"
+                      avx512vbmivlintrin.h clwbintrin.h mwaitxintrin.h
+                      clzerointrin.h pkuintrin.h"
        ;;
 ia64-*-*)
        extra_headers=ia64intrin.h
@@ -419,7 +422,8 @@ microblaze*-*-*)
         ;;
 mips*-*-*)
        cpu_type=mips
-       extra_headers="loongson.h"
+       extra_headers="loongson.h msa.h"
+       extra_objs="frame-header-opt.o"
        extra_options="${extra_options} g.opt fused-madd.opt mips/mips-tables.opt"
        ;;
 nds32*)
@@ -438,7 +442,7 @@ powerpc*-*-*)
        cpu_type=rs6000
        extra_headers="ppc-asm.h altivec.h spe.h ppu_intrinsics.h paired.h spu2vmx.h vec_types.h si2vmx.h htmintrin.h htmxlintrin.h"
        case x$with_cpu in
-           xpowerpc64|xdefault64|x6[23]0|x970|xG5|xpower[345678]|xpower6x|xrs64a|xcell|xa2|xe500mc64|xe5500|Xe6500)
+           xpowerpc64|xdefault64|x6[23]0|x970|xG5|xpower[3456789]|xpower6x|xrs64a|xcell|xa2|xe500mc64|xe5500|xe6500)
                cpu_is_64bit=yes
                ;;
        esac
@@ -587,12 +591,12 @@ tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3 LIBC_MUSL=4"
 x86_archs="athlon athlon-4 athlon-fx athlon-mp athlon-tbird \
 athlon-xp k6 k6-2 k6-3 geode c3 c3-2 winchip-c6 winchip2 i386 i486 \
 i586 i686 pentium pentium-m pentium-mmx pentium2 pentium3 pentium3m \
-pentium4 pentium4m pentiumpro prescott iamcu"
+pentium4 pentium4m pentiumpro prescott lakemont"
 
 # 64-bit x86 processors supported by --with-arch=.  Each processor
 # MUST be separated by exactly one space.
 x86_64_archs="amdfam10 athlon64 athlon64-sse3 barcelona bdver1 bdver2 \
-bdver3 bdver4 btver1 btver2 k8 k8-sse3 opteron opteron-sse3 nocona \
+bdver3 bdver4 znver1 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 knl \
 skylake-avx512 x86-64 native"
@@ -701,7 +705,7 @@ case ${target} in
   esac
   use_gcc_stdint=wrap
   ;;
-*-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu | *-*-gnu* | *-*-kopensolaris*-gnu)
+*-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-gnu* | *-*-kopensolaris*-gnu)
   extra_options="$extra_options gnu-user.opt"
   gas=yes
   gnu_ld=yes
@@ -710,7 +714,7 @@ case ${target} in
   esac
   tmake_file="t-slibgcc"
   case $target in
-    *-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu | *-*-kopensolaris*-gnu)
+    *-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-kopensolaris*-gnu)
       :;;
     *-*-gnu*)
       native_system_header_dir=/include
@@ -797,15 +801,16 @@ case ${target} in
       ;;
   esac
   case ${target} in
-    *-*-openbsd2.*|*-*-openbsd3.[012])
-      tm_defines="${tm_defines} HAS_LIBC_R=1" ;;
-  esac
-  case ${target} in
     *-*-openbsd4.[3-9]|*-*-openbsd[5-9]*)
       default_use_cxa_atexit=yes
       ;;
   esac
   ;;
+*-*-phoenix*)
+  gas=yes
+  gnu_ld=yes
+  default_use_cxa_atexit=yes
+  ;;
 *-*-rtems*)
   case ${enable_threads} in
     "" | yes | rtems) thread_file='rtems' ;;
@@ -898,11 +903,18 @@ case ${target} in
 esac
 
 case ${target} in
-aarch64*-*-elf)
+aarch64*-*-elf | aarch64*-*-rtems*)
        tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h"
        tm_file="${tm_file} aarch64/aarch64-elf.h aarch64/aarch64-elf-raw.h"
        tmake_file="${tmake_file} aarch64/t-aarch64"
-       use_gcc_stdint=wrap
+       case $target in
+       aarch64-*-elf*)
+               use_gcc_stdint=wrap
+               ;;
+       aarch64-*-rtems*)
+               tm_file="${tm_file} rtems.h aarch64/rtems.h"
+               ;;
+       esac
        case $target in
        aarch64_be-*)
                tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
@@ -925,6 +937,11 @@ aarch64*-*-elf)
        done
        TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's/^,//'`
        ;;
+aarch64*-*-freebsd*)
+       tm_file="${tm_file} dbxelf.h elfos.h ${fbsd_tm_file}"
+       tm_file="${tm_file} aarch64/aarch64-elf.h aarch64/aarch64-freebsd.h"
+       tmake_file="${tmake_file} aarch64/t-aarch64 aarch64/t-aarch64-freebsd"
+       ;;
 aarch64*-*-linux*)
        tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h"
        tm_file="${tm_file} aarch64/aarch64-elf.h aarch64/aarch64-linux.h"
@@ -1042,11 +1059,9 @@ arm*-*-freebsd*)                # ARM FreeBSD EABI
        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"
+            if test $fbsd_major -ge 11; then
+               tm_defines="${tm_defines} TARGET_FREEBSD_ARM_HARD_FLOAT=1"
+            fi
            ;;
        esac
        with_tls=${with_tls:-gnu}
@@ -1083,6 +1098,12 @@ arm*-*-uclinux*eabi*)            # ARM ucLinux
        # The EABI requires the use of __cxa_atexit.
        default_use_cxa_atexit=yes
        ;;
+arm*-*-phoenix*)
+       tm_file="elfos.h arm/unknown-elf.h arm/elf.h arm/bpabi.h"
+       tm_file="${tm_file} newlib-stdint.h phoenix.h"
+       tm_file="${tm_file} arm/aout.h arm/arm.h"
+       tmake_file="${tmake_file} arm/t-arm arm/t-bpabi arm/t-phoenix"
+       ;;
 arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtems*)
        case ${target} in
        arm*eb-*-eabi*)
@@ -1110,13 +1131,6 @@ arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtems*)
        esac
        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 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 avr/specs.h dbxelf.h avr/avr-stdint.h"
        if test x${with_avrlibc} != xno; then
@@ -1153,7 +1167,7 @@ bfin*-*)
        use_gcc_stdint=wrap
        ;;
 cr16-*-elf)
-        tm_file="elfos.h ${tm_file}"
+        tm_file="elfos.h ${tm_file} newlib-stdint.h"
         tmake_file="${tmake_file} cr16/t-cr16 "
         use_collect2=no
         ;;
@@ -1233,10 +1247,6 @@ moxie-*-moxiebox*)
        tm_file="${tm_file} dbxelf.h elfos.h moxie/moxiebox.h newlib-stdint.h"
        tmake_file="${tmake_file} moxie/t-moxiebox"
        ;;
-h8300-*-rtems*)
-       tmake_file="${tmake_file} h8300/t-h8300 h8300/t-rtems"
-       tm_file="h8300/h8300.h dbxelf.h elfos.h h8300/elf.h h8300/rtems.h rtems.h newlib-stdint.h"
-       ;;
 h8300-*-elf*)
        tmake_file="h8300/t-h8300"
        tm_file="h8300/h8300.h dbxelf.h elfos.h newlib-stdint.h h8300/elf.h"
@@ -1406,6 +1416,9 @@ i[34567]86-*-elf*)
 x86_64-*-elf*)
        tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h i386/x86-64.h"
        ;;
+x86_64-*-rtems*)
+       tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h i386/x86-64.h i386/rtems-64.h"
+       ;;
 i[34567]86-*-rdos*)
     tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h i386/rdos.h"
     ;;
@@ -1435,14 +1448,6 @@ x86_64-*-netbsd*)
        tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h netbsd.h netbsd-elf.h i386/x86-64.h i386/netbsd64.h"
        extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
        ;;
-i[34567]86-*-openbsd2.*|i[34567]86-*openbsd3.[0123])
-       tm_file="i386/i386.h i386/unix.h i386/bsd.h i386/gas.h i386/gstabs.h openbsd-oldgas.h openbsd.h i386/openbsd.h"
-       extra_options="${extra_options} openbsd.opt"
-       # needed to unconfuse gdb
-       tmake_file="${tmake_file} t-openbsd i386/t-openbsd"
-       # we need collect2 until our bug is fixed...
-       use_collect2=yes
-       ;;
 i[34567]86-*-openbsd*)
        tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h"
        tm_file="${tm_file} openbsd.h openbsd-stdint.h openbsd-libpthread.h i386/openbsdelf.h"
@@ -1457,7 +1462,7 @@ x86_64-*-openbsd*)
        gas=yes
        gnu_ld=yes
        ;;
-i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu | i[34567]86-*-gnu* | i[34567]86-*-kopensolaris*-gnu)
+i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-gnu* | i[34567]86-*-kopensolaris*-gnu)
                        # Intel 80386's running GNU/*
                        # with ELF format using glibc 2
        tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h gnu-user.h glibc-stdint.h"
@@ -1467,7 +1472,7 @@ i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu | i
                extra_options="${extra_options} linux-android.opt"
                # Assume modern glibc if not targeting Android nor uclibc.
                case ${target} in
-               *-*-*android*|*-*-*uclibc*)
+               *-*-*android*|*-*-*uclibc*|*-*-*musl*)
                  ;;
                *)
                  default_gnu_indirect_function=yes
@@ -1513,9 +1518,6 @@ i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu | i
                        tm_file="${tm_file} i386/gnu-user-common.h i386/gnu-user.h i386/linux-common.h i386/linux.h"
                fi
                ;;
-       i[34567]86-*-knetbsd*-gnu)
-               tm_file="${tm_file} i386/gnu-user-common.h i386/gnu-user.h knetbsd-gnu.h i386/knetbsd-gnu.h"
-               ;;
        i[34567]86-*-kfreebsd*-gnu)
                tm_file="${tm_file} i386/gnu-user-common.h i386/gnu-user.h kfreebsd-gnu.h i386/kfreebsd-gnu.h"
                ;;
@@ -1527,7 +1529,7 @@ i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu | i
                ;;
        esac
        ;;
-x86_64-*-linux* | x86_64-*-kfreebsd*-gnu | x86_64-*-knetbsd*-gnu)
+x86_64-*-linux* | x86_64-*-kfreebsd*-gnu)
        tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h gnu-user.h glibc-stdint.h \
                 i386/x86-64.h i386/gnu-user-common.h i386/gnu-user64.h"
        case ${target} in
@@ -1536,7 +1538,7 @@ x86_64-*-linux* | x86_64-*-kfreebsd*-gnu | x86_64-*-knetbsd*-gnu)
                extra_options="${extra_options} linux-android.opt"
                # Assume modern glibc if not targeting Android nor uclibc.
                case ${target} in
-               *-*-*android*|*-*-*uclibc*)
+               *-*-*android*|*-*-*uclibc*|*-*-*musl*)
                  ;;
                *)
                  default_gnu_indirect_function=yes
@@ -1546,9 +1548,6 @@ x86_64-*-linux* | x86_64-*-kfreebsd*-gnu | x86_64-*-knetbsd*-gnu)
        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 i386/knetbsd-gnu64.h"
-               ;;
        esac
        tmake_file="${tmake_file} i386/t-linux64"
        x86_multilibs="${with_multilib_list}"
@@ -1761,19 +1760,6 @@ i[34567]86-*-mingw* | x86_64-*-mingw*)
                        ;;
        esac
        ;;
-i[34567]86-*-interix[3-9]*)
-       tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/i386-interix.h"
-       tmake_file="${tmake_file} i386/t-interix"
-       extra_options="${extra_options} rpath.opt i386/interix.opt"
-       extra_objs="winnt.o winnt-stubs.o"
-       target_gtfiles="\$(srcdir)/config/i386/winnt.c"
-       if test x$enable_threads = xyes ; then
-               thread_file='posix'
-       fi
-       if test x$stabs = xyes ; then
-               tm_file="${tm_file} dbxcoff.h"
-       fi
-       ;;
 ia64*-*-elf*)
        tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h ia64/sysv4.h ia64/elf.h"
        tmake_file="ia64/t-ia64"
@@ -1834,7 +1820,7 @@ iq2000*-*-elf*)
         md_file=iq2000/iq2000.md
         ;;
 lm32-*-elf*)
-        tm_file="dbxelf.h elfos.h ${tm_file}"
+        tm_file="dbxelf.h elfos.h ${tm_file} newlib-stdint.h"
        tmake_file="${tmake_file} lm32/t-lm32"
         ;;
 lm32-*-rtems*)
@@ -1852,10 +1838,6 @@ m32r-*-elf*)
 m32rle-*-elf*)
        tm_file="dbxelf.h elfos.h newlib-stdint.h m32r/little.h ${tm_file}"
        ;;
-m32r-*-rtems*)
-       tm_file="dbxelf.h elfos.h ${tm_file} m32r/rtems.h rtems.h newlib-stdint.h"
-       tmake_file="${tmake_file} m32r/t-m32r"
-       ;;
 m32r-*-linux*)
        tm_file="dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h ${tm_file} m32r/linux.h"
        tmake_file="${tmake_file} m32r/t-linux t-slibgcc"
@@ -1954,17 +1936,6 @@ mcore-*-elf)
        tmake_file=mcore/t-mcore
        inhibit_libc=true
        ;;
-mep-*-*)
-       tm_file="dbxelf.h elfos.h ${tm_file}"
-       tmake_file=mep/t-mep
-       c_target_objs="mep-pragma.o"
-       cxx_target_objs="mep-pragma.o"
-       if test -d "${srcdir}/../newlib/libc/include" &&
-          test "x$with_headers" = x; then
-               with_headers=yes
-       fi
-       use_gcc_stdint=wrap
-       ;;
 microblaze*-linux*)
        case $target in
                microblazeel-*)
@@ -2021,6 +1992,8 @@ mips*-img-linux*)
        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"
+       with_arch_32="mips32r6"
+       with_arch_64="mips64r6"
        gnu_ld=yes
        gas=yes
        ;;
@@ -2029,6 +2002,8 @@ mips*-mti-linux*)
        extra_options="${extra_options} linux-android.opt"
        tmake_file="${tmake_file} mips/t-mti-linux"
        tm_defines="${tm_defines} MIPS_ISA_DEFAULT=33 MIPS_ABI_DEFAULT=ABI_32"
+       with_arch_32="mips32r2"
+       with_arch_64="mips64r2"
        gnu_ld=yes
        gas=yes
        ;;
@@ -2083,11 +2058,15 @@ mips*-mti-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-mti-elf"
        tm_defines="${tm_defines} MIPS_ISA_DEFAULT=33 MIPS_ABI_DEFAULT=ABI_32"
+       with_arch_32="mips32r2"
+       with_arch_64="mips64r2"
        ;;
 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"
+       with_arch_32="mips32r6"
+       with_arch_64="mips64r6"
        ;;
 mips*-sde-elf*)
        tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h mips/n32-elf.h mips/sde.h"
@@ -2235,6 +2214,7 @@ msp430*-*-*)
        c_target_objs="msp430-c.o"
        cxx_target_objs="msp430-c.o"
        tmake_file="${tmake_file} msp430/t-msp430"
+       extra_gcc_objs="driver-msp430.o"
        ;;
 nds32le-*-*)
        target_cpu_default="0"
@@ -2442,6 +2422,10 @@ powerpc*-*-linux*)
            powerpc*-*-linux*paired*)
                tm_file="${tm_file} rs6000/750cl.h" ;;
        esac
+       case ${target} in
+           *-linux*-musl*)
+               enable_secureplt=yes ;;
+       esac
        if test x${enable_secureplt} = xyes; then
                tm_file="rs6000/secureplt.h ${tm_file}"
        fi
@@ -2527,7 +2511,7 @@ rs6000-ibm-aix5.3.* | powerpc-ibm-aix5.3.*)
        use_gcc_stdint=wrap
        extra_headers=altivec.h
        ;;
-rs6000-ibm-aix[6789].* | powerpc-ibm-aix[6789].*)
+rs6000-ibm-aix6.* | powerpc-ibm-aix6.*)
        tm_file="${tm_file} rs6000/aix.h rs6000/aix61.h rs6000/xcoff.h rs6000/aix-stdint.h"
        tmake_file="rs6000/t-aix52 t-slibgcc"
        extra_options="${extra_options} rs6000/aix64.opt"
@@ -2535,6 +2519,17 @@ rs6000-ibm-aix[6789].* | powerpc-ibm-aix[6789].*)
        thread_file='aix'
        use_gcc_stdint=wrap
        extra_headers=altivec.h
+       default_use_cxa_atexit=yes
+       ;;
+rs6000-ibm-aix[789].* | powerpc-ibm-aix[789].*)
+       tm_file="${tm_file} rs6000/aix.h rs6000/aix71.h rs6000/xcoff.h rs6000/aix-stdint.h"
+       tmake_file="rs6000/t-aix52 t-slibgcc"
+       extra_options="${extra_options} rs6000/aix64.opt"
+       use_collect2=yes
+       thread_file='aix'
+       use_gcc_stdint=wrap
+       extra_headers=altivec.h
+       default_use_cxa_atexit=yes
        ;;
 rl78-*-elf*)
        tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
@@ -2582,16 +2577,15 @@ s390x-ibm-tpf*)
        ;;
 sh-*-elf* | sh[12346l]*-*-elf* | \
   sh-*-linux* | sh[2346lbe]*-*-linux* | \
-  sh-*-netbsdelf* | shl*-*-netbsdelf* | sh5-*-netbsd* | sh5l*-*-netbsd* | \
-  sh64-*-netbsd* | sh64l*-*-netbsd*)
+  sh-*-netbsdelf* | shl*-*-netbsdelf*)
        tmake_file="${tmake_file} sh/t-sh sh/t-elf"
        if test x${with_endian} = x; then
                case ${target} in
                sh[1234]*be-*-* | sh[1234]*eb-*-*) with_endian=big ;;
                shbe-*-* | sheb-*-*)               with_endian=big,little ;;
                sh[1234]l* | sh[34]*-*-linux*)     with_endian=little ;;
-               shl* | sh64l* | sh*-*-linux* | \
-                 sh5l* | sh-superh-elf)           with_endian=little,big ;;
+               shl* | sh*-*-linux* | \
+                 sh-superh-elf)                   with_endian=little,big ;;
                sh[1234]*-*-*)                     with_endian=big ;;
                *)                                 with_endian=big,little ;;
                esac
@@ -2612,6 +2606,9 @@ sh-*-elf* | sh[12346l]*-*-elf* | \
        tm_file="${tm_file} dbxelf.h elfos.h sh/elf.h"
        case ${target} in
        sh*-*-linux*)   tmake_file="${tmake_file} sh/t-linux"
+                       if test x$enable_fdpic = xyes; then
+                               tm_defines="$tm_defines FDPIC_DEFAULT=1"
+                       fi
                        tm_file="${tm_file} gnu-user.h linux.h glibc-stdint.h sh/linux.h" ;;
        sh*-*-netbsd*)
                        tm_file="${tm_file} netbsd.h netbsd-elf.h sh/netbsd-elf.h"
@@ -2632,37 +2629,14 @@ sh-*-elf* | sh[12346l]*-*-elf* | \
                        tm_file="${tm_file} sh/embed-elf.h" ;;
        esac
        case ${target} in
-       sh5*-*-netbsd*)
-               # SHmedia, 32-bit ABI
-               tmake_file="${tmake_file} sh/t-sh64"
-               ;;
-       sh64*-netbsd*)
-               # SHmedia, 64-bit ABI
-               tmake_file="${tmake_file} sh/t-sh64 sh/t-netbsd-sh5-64"
-               ;;
        *-*-netbsd)
                ;;
-       sh64*-*-linux*)
-               tmake_file="${tmake_file} sh/t-sh64"
-               tm_file="${tm_file} sh/sh64.h"
-               extra_headers="shmedia.h ushmedia.h sshmedia.h"
-               ;;
-       sh64*)
-               tmake_file="${tmake_file} sh/t-sh64"
-               tm_file="${tm_file} sh/sh64.h"
-               if test x$with_newlib = xyes; then
-                       tm_file="${tm_file} newlib-stdint.h"
-               fi
-               extra_headers="shmedia.h ushmedia.h sshmedia.h"
-               ;;
        *-*-elf*)
                tm_file="${tm_file} newlib-stdint.h"
                ;;
        esac
        # sed el/eb endian suffixes away to avoid confusion with sh[23]e
        case `echo ${target} | sed 's/e[lb]-/-/'` in
-       sh64*-*-netbsd*)        sh_cpu_target=sh5-64media ;;
-       sh64* | sh5*-*-netbsd*) sh_cpu_target=sh5-32media ;;
        sh4a_single_only*)      sh_cpu_target=sh4a-single-only ;;
        sh4a_single*)           sh_cpu_target=sh4a-single ;;
        sh4a_nofpu*)            sh_cpu_target=sh4a-nofpu ;;
@@ -2685,7 +2659,6 @@ sh-*-elf* | sh[12346l]*-*-elf* | \
        # did the user say --without-fp ?
        if test x$with_fp = xno; then
                case ${sh_cpu_target} in
-               sh5-*media)     sh_cpu_target=${sh_cpu_target}-nofpu ;;
                sh4al | sh1)    ;;
                sh4a* )         sh_cpu_target=sh4a-nofpu ;;
                sh4*)           sh_cpu_target=sh4-nofpu ;;
@@ -2698,8 +2671,6 @@ sh-*-elf* | sh[12346l]*-*-elf* | \
        fi
        sh_cpu_default="`echo $with_cpu|sed s/^m/sh/|tr A-Z_ a-z-`"
        case $sh_cpu_default in
-       sh5-64media-nofpu | sh5-64media | \
-         sh5-32media-nofpu | sh5-32media | sh5-compact-nofpu | sh5-compact | \
          sh2a-single-only | sh2a-single | sh2a-nofpu | sh2a | \
          sh4a-single-only | sh4a-single | sh4a-nofpu | sh4a | sh4al | \
          sh4-single-only | sh4-single | sh4-nofpu | sh4 | sh4-300 | \
@@ -2710,9 +2681,7 @@ sh-*-elf* | sh[12346l]*-*-elf* | \
        sh_multilibs=${with_multilib_list}
        if test "$sh_multilibs" = "default" ; then
                case ${target} in
-               sh64-superh-linux* | \
                sh[1234]*)      sh_multilibs=${sh_cpu_target} ;;
-               sh64* | sh5*)   sh_multilibs=m5-32media,m5-32media-nofpu,m5-compact,m5-compact-nofpu,m5-64media,m5-64media-nofpu ;;
                sh-superh-*)    sh_multilibs=m4,m4-single,m4-single-only,m4-nofpu ;;
                sh*-*-linux*)   sh_multilibs=m1,m2,m2a,m3e,m4 ;;
                sh*-*-netbsd*)  sh_multilibs=m3,m3e,m4 ;;
@@ -2731,10 +2700,7 @@ sh-*-elf* | sh[12346l]*-*-elf* | \
                m1 | m2 | m2e | m3 | m3e | \
                m4 | m4-single | m4-single-only | m4-nofpu | m4-300 |\
                m4a | m4a-single | m4a-single-only | m4a-nofpu | m4al | \
-               m2a | m2a-single | m2a-single-only | m2a-nofpu | \
-               m5-64media | m5-64media-nofpu | \
-               m5-32media | m5-32media-nofpu | \
-               m5-compact | m5-compact-nofpu)
+               m2a | m2a-single | m2a-single-only | m2a-nofpu)
                        # TM_MULTILIB_CONFIG is used by t-sh for the non-endian multilib definition
                        # It is passed to MULTIILIB_OPTIONS verbatim.
                        TM_MULTILIB_CONFIG="${TM_MULTILIB_CONFIG}/${sh_multilib}"
@@ -2751,7 +2717,7 @@ sh-*-elf* | sh[12346l]*-*-elf* | \
        done
        TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's:^/::'`
        if test x${enable_incomplete_targets} = xyes ; then
-               tm_defines="$tm_defines SUPPORT_SH1=1 SUPPORT_SH2E=1 SUPPORT_SH4=1 SUPPORT_SH4_SINGLE=1 SUPPORT_SH2A=1 SUPPORT_SH2A_SINGLE=1 SUPPORT_SH5_32MEDIA=1 SUPPORT_SH5_32MEDIA_NOFPU=1 SUPPORT_SH5_64MEDIA=1 SUPPORT_SH5_64MEDIA_NOFPU=1"
+               tm_defines="$tm_defines SUPPORT_SH1=1 SUPPORT_SH2E=1 SUPPORT_SH4=1 SUPPORT_SH4_SINGLE=1 SUPPORT_SH2A=1 SUPPORT_SH2A_SINGLE=1"
        fi
        tm_file="$tm_file ./sysroot-suffix.h"
        tmake_file="$tmake_file t-sysroot-suffix"
@@ -2986,6 +2952,11 @@ xtensa*-*-linux*)
        tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h xtensa/linux.h"
        tmake_file="${tmake_file} xtensa/t-xtensa"
        ;;
+xtensa*-*-uclinux*)
+       tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h xtensa/uclinux.h"
+       tmake_file="${tmake_file} xtensa/t-xtensa"
+       extra_options="${extra_options} xtensa/uclinux.opt"
+       ;;
 am33_2.0-*-linux*)
        tm_file="mn10300/mn10300.h dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h mn10300/linux.h"
        gas=yes gnu_ld=yes
@@ -3105,6 +3076,10 @@ case ${target} in
     ;;
   i686-*-* | i786-*-*)
     case ${target_noncanonical} in
+      znver1-*)
+       arch=znver1
+       cpu=znver1
+       ;;
       bdver4-*)
         arch=bdver4
         cpu=bdver4
@@ -3218,6 +3193,10 @@ case ${target} in
     ;;
   x86_64-*-*)
     case ${target_noncanonical} in
+      znver1-*)
+       arch=znver1
+       cpu=znver1
+       ;;
       bdver4-*)
         arch=bdver4
         cpu=bdver4
@@ -3287,7 +3266,7 @@ esac
 if test x$with_cpu = x ; then
   case ${target} in
     i[34567]86-*-elfiamcu)
-      with_cpu=iamcu
+      with_cpu=lakemont
       ;;
     i[34567]86-*-*|x86_64-*-*)
       with_cpu=$cpu
@@ -3385,7 +3364,7 @@ if test x$with_arch = x ; then
       # and TARGET_SUBTARGET64_ISA_DEFAULT in config/i386/darwin.h.
       ;;
     i[34567]86-*-elfiamcu)
-      with_arch=iamcu
+      with_arch=lakemont
       ;;
     i[34567]86-*-*)
       # --with-fpmath sets the default ISA to SSE2, which is the same
@@ -3522,7 +3501,7 @@ case "${target}" in
 
                        eval "val=\$with_$which"
                        base_val=`echo $val | sed -e 's/\+.*//'`
-                       ext_val=`echo $val | sed -e 's/[a-z0-9\-]\+//'`
+                       ext_val=`echo $val | sed -e 's/[a-z0-9.-]\+//'`
 
                        if [ $which = arch ]; then
                          def=aarch64-arches.def
@@ -3569,22 +3548,28 @@ case "${target}" in
                                    ${srcdir}/config/aarch64/aarch64-option-extensions.def \
                                    > /dev/null; then
 
-                                 ext_on=`grep "^AARCH64_OPT_EXTENSION(\"$base_ext\"," \
+                                 ext_canon=`grep "^AARCH64_OPT_EXTENSION(\"$base_ext\"," \
                                        ${srcdir}/config/aarch64/aarch64-option-extensions.def | \
                                        sed -e 's/^[^,]*,[      ]*//' | \
                                        sed -e 's/,.*$//'`
-                                 ext_off=`grep "^AARCH64_OPT_EXTENSION(\"$base_ext\"," \
+                                 ext_on=`grep "^AARCH64_OPT_EXTENSION(\"$base_ext\"," \
                                        ${srcdir}/config/aarch64/aarch64-option-extensions.def | \
                                        sed -e 's/^[^,]*,[      ]*[^,]*,[       ]*//' | \
                                        sed -e 's/,.*$//' | \
                                        sed -e 's/).*$//'`
+                                 ext_off=`grep "^AARCH64_OPT_EXTENSION(\"$base_ext\"," \
+                                       ${srcdir}/config/aarch64/aarch64-option-extensions.def | \
+                                       sed -e 's/^[^,]*,[      ]*[^,]*,[       ]*[^,]*,[       ]*//' | \
+                                       sed -e 's/,.*$//' | \
+                                       sed -e 's/).*$//'`
+
 
                                  if [ $ext = $base_ext ]; then
                                        # Adding extension
-                                       ext_mask="("$ext_mask") | ("$ext_on")"
+                                       ext_mask="("$ext_mask") | ("$ext_on" | "$ext_canon")"
                                  else
                                        # Removing extension
-                                       ext_mask="("$ext_mask") & ~("$ext_off")"
+                                       ext_mask="("$ext_mask") & ~("$ext_off" | "$ext_canon")"
                                  fi
 
                                  true
@@ -3740,38 +3725,40 @@ case "${target}" in
                # Add extra multilibs
                if test "x$with_multilib_list" != x; then
                        arm_multilibs=`echo $with_multilib_list | sed -e 's/,/ /g'`
-                       for arm_multilib in ${arm_multilibs}; do
-                               case ${arm_multilib} in
-                               aprofile)
+                       case ${arm_multilibs} in
+                       aprofile)
                                # Note that arm/t-aprofile is a
                                # stand-alone make file fragment to be
                                # used only with itself.  We do not
                                # specifically use the
                                # TM_MULTILIB_OPTION framework because
                                # this shorthand is more
-                               # pragmatic. Additionally it is only
-                               # designed to work without any
-                               # with-cpu, with-arch with-mode
+                               # pragmatic.
+                               tmake_profile_file="arm/t-aprofile"
+                               ;;
+                       default)
+                               ;;
+                       *)
+                               echo "Error: --with-multilib-list=${with_multilib_list} not supported." 1>&2
+                               exit 1
+                               ;;
+                       esac
+
+                       if test "x${tmake_profile_file}" != x ; then
+                               # arm/t-aprofile is only designed to work
+                               # without any with-cpu, with-arch, with-mode,
                                # with-fpu or with-float options.
-                                       if test "x$with_arch" != x \
-                                           || test "x$with_cpu" != x \
-                                           || test "x$with_float" != x \
-                                           || test "x$with_fpu" != x \
-                                           || test "x$with_mode" != x ; then
-                                           echo "Error: You cannot use any of --with-arch/cpu/fpu/float/mode with --with-multilib-list=aprofile" 1>&2
-                                           exit 1
-                                       fi
-                                       tmake_file="${tmake_file} arm/t-aprofile"
-                                       break
-                                       ;;
-                               default)
-                                       ;;
-                               *)
-                                       echo "Error: --with-multilib-list=${with_multilib_list} not supported." 1>&2
-                                       exit 1
-                                       ;;
-                               esac
-                       done
+                               if test "x$with_arch" != x \
+                                   || test "x$with_cpu" != x \
+                                   || test "x$with_float" != x \
+                                   || test "x$with_fpu" != x \
+                                   || test "x$with_mode" != x ; then
+                                   echo "Error: You cannot use any of --with-arch/cpu/fpu/float/mode with --with-multilib-list=${with_multilib_list}" 1>&2
+                                   exit 1
+                               fi
+
+                               tmake_file="${tmake_file} ${tmake_profile_file}"
+                       fi
                fi
                ;;
 
@@ -4099,7 +4086,7 @@ case "${target}" in
                                eval "with_$which=405"
                                ;;
                        "" | common | native \
-                       | power | power[2345678] | power6x | powerpc | powerpc64 \
+                       | power | power[23456789] | power6x | powerpc | powerpc64 \
                        | rios | rios1 | rios2 | rsc | rsc1 | rs64a \
                        | 401 | 403 | 405 | 405fp | 440 | 440fp | 464 | 464fp \
                        | 476 | 476fp | 505 | 601 | 602 | 603 | 603e | ec603e \
@@ -4223,9 +4210,9 @@ case "${target}" in
                esac
                ;;
        sparc*-*-*)
-               supported_defaults="cpu float tune"
+               supported_defaults="cpu cpu_32 cpu_64 float tune tune_32 tune_64"
 
-               for which in cpu tune; do
+               for which in cpu cpu_32 cpu_64 tune tune_32 tune_64; do
                        eval "val=\$with_$which"
                        case ${val} in
                        "" | sparc | sparcv9 | sparc64 \
@@ -4234,7 +4221,7 @@ case "${target}" in
                        | sparclite | f930 | f934 | sparclite86x \
                        | sparclet | tsc701 \
                        | v9 | ultrasparc | ultrasparc3 | niagara | niagara2 \
-                       | niagara3 | niagara4)
+                       | niagara3 | niagara4 | niagara7)
                                # OK
                                ;;
                        *)
@@ -4355,6 +4342,9 @@ case ${target} in
        i[34567]86-*-gnu*)
                tmake_file="$tmake_file i386/t-gnu"
                ;;
+       i[34567]86-*-msdosdjgpp*)
+               tmake_file="${tmake_file} i386/t-djgpp"
+               ;;
        i[34567]86-*-solaris2* | x86_64-*-solaris2.1[0-9]*)
                ;;
        i[34567]86-*-cygwin* | x86_64-*-cygwin*)