OSDN Git Service

Merge remote-tracking branch 'gnu/gcc-4_6-branch' into rework
[pf3gnuchains/gcc-fork.git] / gcc / config.gcc
index c353e80..acdaa8d 100644 (file)
@@ -1,6 +1,6 @@
 # GCC target-specific configuration file.
 # Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-# 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+# 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
 
 #This file is part of GCC.
 
@@ -237,8 +237,10 @@ case ${target} in
  | alpha*-*-gnu*                       \
  | arm*-*-netbsd*                      \
  | arm-*-pe*                           \
+ | crx-*                               \
  | i[34567]86-*-interix3*              \
  | i[34567]86-*-netbsd*                        \
+ | i[3456x]86-*-netware*               \
  | i[34567]86-*-pe                     \
  | m68hc11-*-*                         \
  | m6811-*-*                           \
@@ -247,6 +249,7 @@ case ${target} in
  | m68k-*-uclinuxoldabi*               \
  | mcore-*-pe*                         \
  | powerpc*-*-gnu*                     \
+ | score-*                             \
  | sh*-*-symbianelf*                   \
  | vax-*-netbsd*                       \
  )
@@ -559,6 +562,7 @@ case ${target} in
   use_gcc_stdint=wrap
   ;;
 *-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu | *-*-gnu* | *-*-kopensolaris*-gnu)
+  extra_options="$extra_options gnu-user.opt"
   extra_parts="crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o"
   gas=yes
   gnu_ld=yes
@@ -673,6 +677,7 @@ case ${target} in
   use_gcc_stdint=wrap
   ;;
 *-*-uclinux*)
+  extra_options="$extra_options gnu-user.opt"
   use_gcc_stdint=wrap
   tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC SINGLE_LIBC"
   ;;
@@ -812,7 +817,7 @@ arm*-*-netbsd*)
 arm*-*-linux*)                 # ARM GNU/Linux with ELF
        tm_file="dbxelf.h elfos.h gnu-user.h linux.h linux-android.h glibc-stdint.h arm/elf.h arm/linux-gas.h arm/linux-elf.h"
        case $target in
-       arm*b-*)
+       arm*b-*-linux*)
                tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
                ;;
        esac
@@ -865,7 +870,12 @@ arm*-*-ecos-elf)
        tmake_file="arm/t-arm arm/t-arm-elf"
        tmake_file="${tmake_file} arm/t-arm-softfp soft-fp/t-softfp"
        ;;
-arm*-*-eabi* | arm*-*-symbianelf* )
+arm*-*-rtemself*)
+       tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h arm/rtems-elf.h rtems.h newlib-stdint.h"
+       tmake_file="arm/t-arm arm/t-arm-elf t-rtems arm/t-rtems"
+       tmake_file="${tmake_file} arm/t-arm-softfp soft-fp/t-softfp"
+       ;;
+arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtems*)
        # The BPABI long long divmod functions return a 128-bit value in
        # registers r0-r3.  Correctly modeling that requires the use of
        # TImode.
@@ -880,6 +890,10 @@ arm*-*-eabi* | arm*-*-symbianelf* )
          tmake_file="${tmake_file} arm/t-bpabi"
          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 t-rtems arm/t-rtems-eabi"
+         ;;
        arm*-*-symbianelf*)
          tm_file="${tm_file} arm/symbian.h"
          # We do not include t-bpabi for Symbian OS because the system
@@ -890,11 +904,6 @@ arm*-*-eabi* | arm*-*-symbianelf* )
        tm_file="${tm_file} arm/aout.h arm/arm.h"
        tmake_file="${tmake_file} arm/t-arm-softfp soft-fp/t-softfp"
        ;;
-arm*-*-rtems*)
-       tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h arm/rtems-elf.h rtems.h newlib-stdint.h"
-       tmake_file="arm/t-arm arm/t-arm-elf t-rtems arm/t-rtems"
-       tmake_file="${tmake_file} arm/t-arm-softfp soft-fp/t-softfp"
-       ;;
 arm*-*-elf)
        tm_file="dbxelf.h elfos.h newlib-stdint.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h"
        tmake_file="arm/t-arm arm/t-arm-elf"
@@ -920,7 +929,7 @@ avr-*-rtems*)
        extra_objs="avr-devices.o"
        ;;
 avr-*-*)
-       tm_file="avr/avr.h dbxelf.h newlib-stdint.h"
+       tm_file="avr/avr.h dbxelf.h avr/avr-stdint.h"
        use_gcc_stdint=wrap
        extra_gcc_objs="driver-avr.o avr-devices.o"
        extra_objs="avr-devices.o"
@@ -1004,7 +1013,7 @@ frv-*-*linux*)
 moxie-*-elf)
        gas=yes
        gnu_ld=yes
-       tm_file="dbxelf.h elfos.h ${tm_file}"
+       tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
        extra_parts="crti.o crtn.o crtbegin.o crtend.o"
        tmake_file="${tmake_file} moxie/t-moxie moxie/t-moxie-softfp soft-fp/t-softfp"
        ;;
@@ -1163,6 +1172,7 @@ hppa[12]*-*-hpux11*)
        else
            tmake_file="$tmake_file pa/t-slibgcc-dwarf-ver"
        fi
+       extra_parts="libgcc_stub.a"
        case x${enable_threads} in
        x | xyes | xposix )
                thread_file=posix
@@ -1207,6 +1217,7 @@ x86_64-*-elf*)
        ;;
 i[34567]86-*-freebsd*)
        tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${fbsd_tm_file} i386/freebsd.h"
+       tmake_file="${tmake_file} i386/t-crtstuff"
        ;;
 x86_64-*-freebsd*)
        tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${fbsd_tm_file} i386/x86-64.h i386/freebsd.h i386/freebsd64.h"
@@ -1275,10 +1286,17 @@ i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu | i
                        tm_file="${tm_file} i386/linux.h"
                fi
                ;;
-       i[34567]86-*-knetbsd*-gnu) tm_file="${tm_file} i386/linux.h knetbsd-gnu.h i386/knetbsd-gnu.h" ;;
-       i[34567]86-*-kfreebsd*-gnu) tm_file="${tm_file} i386/linux.h kfreebsd-gnu.h i386/kfreebsd-gnu.h" ;;
-       i[34567]86-*-kopensolaris*-gnu) tm_file="${tm_file} i386/linux.h kopensolaris-gnu.h i386/kopensolaris-gnu.h" ;;
-       i[34567]86-*-gnu*) tm_file="$tm_file i386/linux.h gnu.h i386/gnu.h";;
+       i[34567]86-*-knetbsd*-gnu)
+               tm_file="${tm_file} i386/linux.h knetbsd-gnu.h i386/knetbsd-gnu.h"
+               ;;
+       i[34567]86-*-kfreebsd*-gnu)
+               tm_file="${tm_file} i386/linux.h kfreebsd-gnu.h i386/kfreebsd-gnu.h"
+               ;;
+       i[34567]86-*-kopensolaris*-gnu)
+               tm_file="${tm_file} i386/linux.h kopensolaris-gnu.h i386/kopensolaris-gnu.h"
+               ;;
+       i[34567]86-*-gnu*)
+               tm_file="$tm_file i386/linux.h gnu.h i386/gnu.h";;
        esac
        tmake_file="${tmake_file} i386/t-crtstuff i386/t-crtpc i386/t-crtfm t-dfprules"
        ;;
@@ -1287,15 +1305,20 @@ x86_64-*-linux* | x86_64-*-kfreebsd*-gnu | x86_64-*-knetbsd*-gnu)
                 i386/x86-64.h i386/linux64.h"
        case ${target} in
        x86_64-*-linux*)
-         default_gnu_indirect_function=glibc-2011 ;;
-       x86_64-*-kfreebsd*-gnu) tm_file="${tm_file} kfreebsd-gnu.h" ;;
-       x86_64-*-knetbsd*-gnu) tm_file="${tm_file} knetbsd-gnu.h" ;;
+               default_gnu_indirect_function=yes
+               ;;
+       x86_64-*-kfreebsd*-gnu)
+               tm_file="${tm_file} kfreebsd-gnu.h"
+               ;;
+       x86_64-*-knetbsd*-gnu)
+               tm_file="${tm_file} knetbsd-gnu.h"
+               ;;
        esac
        tmake_file="${tmake_file} i386/t-linux64 i386/t-crtstuff i386/t-crtpc i386/t-crtfm t-dfprules"
        ;;
 i[34567]86-pc-msdosdjgpp*)
        xm_file=i386/xm-djgpp.h
-       tm_file="dbxcoff.h ${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/djgpp.h"
+       tm_file="dbxcoff.h ${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/djgpp.h i386/djgpp-stdint.h"
        tmake_file="${tmake_file} i386/t-djgpp"
        extra_options="${extra_options} i386/djgpp.opt"
        gnu_ld=yes
@@ -1766,6 +1789,7 @@ m68k-*-uclinux*)          # Motorola m68k/ColdFire running uClinux
        default_m68k_cpu=68020
        default_cf_cpu=5206
        tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h flat.h m68k/linux.h m68k/uclinux.h ./sysroot-suffix.h"
+       extra_options="${extra_options} m68k/uclinux.opt"
        tm_defines="${tm_defines} MOTOROLA=1"
        tmake_file="m68k/t-floatlib m68k/t-uclinux m68k/t-mlibs"
        ;;
@@ -1984,6 +2008,11 @@ mips-*-elf* | mipsel-*-elf*)
        tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h"
        tmake_file="mips/t-elf mips/t-libgcc-mips16"
        ;;
+mips64-*-toppers* | mips64el-*-toppers*)
+       tm_file="elfos.h ${tm_file} mips/elf.h mips/toppers.h"
+       tmake_file="mips/t-elf mips/t-libgcc-mips16"
+       tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_N32"
+       ;;
 mips64-*-elf* | mips64el-*-elf*)
        tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h"
        tmake_file="mips/t-elf mips/t-libgcc-mips16"
@@ -2065,9 +2094,10 @@ powerpc64-*-darwin*)
        tm_file="${tm_file} ${cpu_type}/darwin8.h ${cpu_type}/darwin64.h"
        extra_headers=altivec.h
        ;;
-powerpc*-*-freebsd*)
+powerpc-*-freebsd*)
        tm_file="${tm_file} dbxelf.h elfos.h ${fbsd_tm_file} rs6000/sysv4.h rs6000/freebsd.h"
-       tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm"
+       tmake_file="rs6000/t-fprules rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm rs6000/t-freebsd"
+       tmake_file="${tmake_file} t-slibgcc-libgcc rs6000/t-fprules-softfp soft-fp/t-softfp"
        extra_options="${extra_options} rs6000/sysv4.opt"
        ;;
 powerpc-*-netbsd*)
@@ -2151,6 +2181,7 @@ powerpc-*-linux* | powerpc64-*-linux*)
                ;;
            *)
                tm_file="${tm_file} rs6000/linux.h glibc-stdint.h"
+               tmake_file="$tmake_file rs6000/t-linux"
                ;;
        esac
        tmake_file="${tmake_file} t-slibgcc-libgcc rs6000/t-fprules-softfp soft-fp/t-softfp"
@@ -2300,9 +2331,12 @@ s390x-ibm-tpf*)
        extra_options="${extra_options} s390/tpf.opt"
        ;;
 score-*-elf)
+       gas=yes
+       gnu_ld=yes
         tm_file="dbxelf.h elfos.h score/elf.h score/score.h newlib-stdint.h"
-        tmake_file=score/t-score-elf
-        extra_objs="score7.o score3.o"
+       extra_parts="crti.o crtn.o crtbegin.o crtend.o"
+        tmake_file="${tmake_file} score/t-score-elf score/t-score-softfp soft-fp/t-softfp"
+        extra_objs="score7.o"
         ;;
 sh-*-elf* | sh[12346l]*-*-elf* | \
 sh-*-symbianelf* | sh[12346l]*-*-symbianelf* | \
@@ -2511,12 +2545,12 @@ sparc-*-elf*)
                tmake_file="sparc/t-elf"
                ;;
        esac
-       tmake_file="${tmake_file} sparc/t-crtfm"
+       tmake_file="${tmake_file} sparc/t-crtin sparc/t-crtfm"
        extra_parts="crtbegin.o crtend.o"
        ;;
 sparc-*-rtems*)
        tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h sparc/sp-elf.h sparc/rtemself.h rtems.h newlib-stdint.h"
-       tmake_file="sparc/t-elf sparc/t-crtfm t-rtems"
+       tmake_file="sparc/t-elf sparc/t-crtin sparc/t-crtfm t-rtems"
        extra_parts="crtbegin.o crtend.o"
        ;;
 sparc-*-linux*)
@@ -2560,7 +2594,7 @@ sparc*-*-solaris2*)
        tm_file="${tm_file} sparc/sol2.h"
        case ${target} in
            sparc64-*-* | sparcv9-*-*)
-               tm_file="${tm_file} sparc/sol2-64.h"
+               tm_file="sparc/sol2-64.h ${tm_file}"
                ;;
            *)
                test x$with_cpu != x || with_cpu=v9
@@ -2574,7 +2608,7 @@ sparc*-*-solaris2*)
                tm_file="${tm_file} sol2-gld.h sparc/sol2-gld-bi.h"
        fi
        tm_file="${tm_file} tm-dwarf2.h"
-       tmake_file="t-sol2 sparc/t-sol2 sparc/t-sol2-64 sparc/t-crtfm"
+       tmake_file="t-sol2 sparc/t-sol2 sparc/t-sol2-64 sparc/t-crtin sparc/t-crtfm"
        if test x$gnu_ld = xyes; then
                tmake_file="$tmake_file t-slibgcc-elf-ver"
        else
@@ -2587,7 +2621,7 @@ sparc*-*-solaris2*)
        cxx_target_objs="sol2-c.o"
        extra_objs="sol2.o"
        tm_p_file="${tm_p_file} sol2-protos.h"
-       extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
+       extra_parts="crt1.o gcrt1.o gmon.o crtbegin.o crtend.o"
        case ${enable_threads}:${have_pthread_h}:${have_thread_h} in
          "":yes:* | yes:yes:* )
                thread_file=posix
@@ -2604,13 +2638,13 @@ sparc-wrs-vxworks)
 sparc64-*-elf*)
        tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h sparc/sysv4.h sparc/sp64-elf.h"
        extra_options="${extra_options} sparc/little-endian.opt"
-       tmake_file="${tmake_file} sparc/t-crtfm"
+       tmake_file="${tmake_file} sparc/t-crtin sparc/t-crtfm"
        extra_parts="crtbegin.o crtend.o"
        ;;
 sparc64-*-rtems*)
        tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h sparc/sysv4.h sparc/sp64-elf.h sparc/rtemself.h rtems.h"
        extra_options="${extra_options} sparc/little-endian.opt"
-       tmake_file="${tmake_file} sparc/t-crtfm t-rtems"
+       tmake_file="${tmake_file} sparc/t-crtin sparc/t-crtfm t-rtems"
        extra_parts="crtbegin.o crtend.o"
        ;;
 sparc64-*-linux*)
@@ -2702,11 +2736,12 @@ v850-*-*)
        ;;
 vax-*-linux*)
        tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h vax/elf.h vax/linux.h"
+       extra_options="${extra_options} vax/elf.opt"
        tmake_file="${tmake_file} vax/t-linux"
        ;;
 vax-*-netbsdelf*)
        tm_file="${tm_file} elfos.h netbsd.h netbsd-elf.h vax/elf.h vax/netbsd-elf.h"
-       extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
+       extra_options="${extra_options} netbsd.opt netbsd-elf.opt vax/elf.opt"
        ;;
 vax-*-netbsd*)
        tm_file="${tm_file} netbsd.h netbsd-aout.h vax/netbsd.h"
@@ -2732,6 +2767,7 @@ xstormy16-*-elf)
        ;;
 xtensa*-*-elf*)
        tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h xtensa/elf.h"
+       extra_options="${extra_options} xtensa/elf.opt"
        tmake_file="xtensa/t-xtensa xtensa/t-elf"
        ;;
 xtensa*-*-linux*)
@@ -2789,6 +2825,16 @@ cpu=
 arch_without_sse2=no
 arch_without_64bit=no
 case ${target} in
+  i386-*-freebsd*)
+    if test $fbsd_major -ge 6; then
+      arch=i486
+    else
+      arch=i386
+    fi
+    cpu=generic
+    arch_without_sse2=yes
+    arch_without_64bit=yes
+    ;;
   i386-*-*)
     arch=i386
     cpu=i386
@@ -3623,11 +3669,15 @@ case ${target} in
        i[34567]86-*-darwin* | x86_64-*-darwin*)
                tmake_file="${tmake_file} i386/t-fprules-softfp soft-fp/t-softfp"
                ;;
-       i[34567]86-*-linux* | x86_64-*-linux* | \
-         i[34567]86-*-kfreebsd*-gnu | x86_64-*-kfreebsd*-gnu | \
-         i[34567]86-*-gnu*)
+       i[34567]86-*-linux* | x86_64-*-linux*)
                tmake_file="${tmake_file} i386/t-fprules-softfp soft-fp/t-softfp i386/t-linux"
                ;;
+       i[34567]86-*-kfreebsd*-gnu | x86_64-*-kfreebsd*-gnu)
+               tmake_file="${tmake_file} i386/t-fprules-softfp soft-fp/t-softfp i386/t-linux i386/t-kfreebsd"
+               ;;
+       i[34567]86-*-gnu*)
+               tmake_file="${tmake_file} i386/t-fprules-softfp soft-fp/t-softfp i386/t-linux i386/t-gnu"
+               ;;
        i[34567]86-*-solaris2*)
                tmake_file="${tmake_file} i386/t-fprules-softfp soft-fp/t-softfp"
                ;;