aboutsummaryrefslogtreecommitdiff
path: root/contrib/gcc/config.gcc
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/gcc/config.gcc')
-rw-r--r--contrib/gcc/config.gcc170
1 files changed, 94 insertions, 76 deletions
diff --git a/contrib/gcc/config.gcc b/contrib/gcc/config.gcc
index 09466478a9de..9c5c19340439 100644
--- a/contrib/gcc/config.gcc
+++ b/contrib/gcc/config.gcc
@@ -244,6 +244,7 @@ esac
# machines.
tm_p_file=
cpu_type=`echo ${target} | sed 's/-.*$//'`
+cpu_is_64bit=
case ${target} in
alpha*-*-*)
cpu_type=alpha
@@ -300,6 +301,11 @@ powerpc*-*-*)
cpu_type=rs6000
extra_headers="ppc-asm.h altivec.h spe.h"
need_64bit_hwint=yes
+ case x$with_cpu in
+ xpowerpc64|xdefault64|x6[23]0|x970|xG5|xpower[345]|xrs64a)
+ cpu_is_64bit=yes
+ ;;
+ esac
;;
rs6000*-*-*)
need_64bit_hwint=yes
@@ -680,7 +686,7 @@ arm*-*-ecos-elf)
;;
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"
- tmake_file="arm/t-arm-elf t-rtems"
+ tmake_file="arm/t-arm-elf t-rtems arm/t-rtems"
;;
arm*-*-elf | ep9312-*-elf)
tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h"
@@ -700,12 +706,16 @@ arm*-*-kaos*)
tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h kaos.h arm/kaos-arm.h"
tmake_file=arm/t-arm-elf
;;
+avr-*-rtems*)
+ tm_file="avr/avr.h dbxelf.h avr/rtems.h rtems.h"
+ tmake_file="avr/t-avr t-rtems avr/t-rtems"
+ ;;
avr-*-*)
tm_file="avr/avr.h dbxelf.h"
use_fixproto=yes
;;
c4x-*-rtems* | tic4x-*-rtems*)
- tmake_file="c4x/t-c4x t-rtems"
+ tmake_file="c4x/t-c4x t-rtems c4x/t-rtems"
tm_file="c4x/c4x.h c4x/rtems.h rtems.h"
c_target_objs="c4x-c.o"
cxx_target_objs="c4x-c.o"
@@ -1257,12 +1267,12 @@ ia64*-*-freebsd*)
;;
ia64*-*-linux*)
tm_file="${tm_file} dbxelf.h elfos.h svr4.h linux.h ia64/sysv4.h ia64/linux.h"
- tmake_file="t-slibgcc-elf-ver t-linux ia64/t-ia64 ia64/t-glibc"
+ tmake_file="t-slibgcc-elf-ver t-linux ia64/t-ia64 t-libunwind ia64/t-glibc"
+ if test x$with_system_libunwind != xyes ; then
+ tmake_file="${tmake_file} t-libunwind-elf ia64/t-glibc-libunwind"
+ fi
target_cpu_default="MASK_GNU_AS|MASK_GNU_LD"
extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtfastmath.o"
- if test x"$use_libunwind_exceptions" = xyes; then
- tmake_file="$tmake_file t-libunwind"
- fi
;;
ia64*-*-hpux*)
tm_file="${tm_file} dbxelf.h elfos.h svr4.h ia64/sysv4.h ia64/hpux.h"
@@ -1678,20 +1688,16 @@ pdp11-*-bsd)
pdp11-*-*)
use_fixproto=yes
;;
-avr-*-*)
- use_fixproto=yes
- ;;
# port not yet contributed
#powerpc-*-openbsd*)
# tmake_file="${tmake_file} rs6000/t-fprules "
# extra_headers=
# ;;
powerpc64-*-linux*)
- tm_file="rs6000/biarch64.h ${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h"
- case x$with_cpu in
- x|xpowerpc64|xdefault64) tm_file="${tm_file} rs6000/default64.h";;
- esac
- tm_file="${tm_file} rs6000/linux64.h"
+ tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h"
+ test x$with_cpu != x || cpu_is_64bit=yes
+ test x$cpu_is_64bit != xyes || tm_file="${tm_file} rs6000/default64.h"
+ tm_file="rs6000/biarch64.h ${tm_file} rs6000/linux64.h"
tmake_file="rs6000/t-fprules t-slibgcc-elf-ver t-linux rs6000/t-ppccomm rs6000/t-linux64"
;;
powerpc64-*-gnu*)
@@ -1765,8 +1771,20 @@ powerpc-*-linux*spe*)
tmake_file="rs6000/t-fprules rs6000/t-ppcos t-slibgcc-elf-ver t-linux rs6000/t-ppccomm"
;;
powerpc-*-linux*)
- tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/linux.h"
+ tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h"
tmake_file="rs6000/t-fprules rs6000/t-ppcos t-slibgcc-elf-ver t-linux rs6000/t-ppccomm"
+ case ${enable_targets}:${cpu_is_64bit} in
+ *powerpc64* | all:* | *:yes)
+ if test x$cpu_is_64bit = xyes; then
+ tm_file="${tm_file} rs6000/default64.h"
+ fi
+ tm_file="rs6000/biarch64.h ${tm_file} rs6000/linux64.h"
+ tmake_file="$tmake_file rs6000/t-linux64"
+ ;;
+ *)
+ tm_file="${tm_file} rs6000/linux.h"
+ ;;
+ esac
;;
powerpc-*-gnu-gnualtivec*)
tm_file="${cpu_type}/${cpu_type}.h elfos.h svr4.h freebsd-spec.h gnu.h rs6000/sysv4.h rs6000/linux.h rs6000/linuxaltivec.h rs6000/gnu.h"
@@ -2007,7 +2025,7 @@ sparc64-*-openbsd*)
with_cpu=ultrasparc
;;
sparc-*-elf*)
- tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h sparc/elf.h"
+ tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h sparc/sol2-gld.h sparc/elf.h"
tmake_file="sparc/t-elf sparc/t-crtfm"
extra_parts="crti.o crtn.o crtbegin.o crtend.o"
use_fixproto=yes
@@ -2017,7 +2035,7 @@ sparc-*-linux*) # SPARC's running GNU/Linux, libc6
tmake_file="t-slibgcc-elf-ver t-linux sparc/t-crtfm"
;;
sparc-*-rtems*)
- tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h sparc/elf.h sparc/rtemself.h rtems.h"
+ tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h sparc/sol2-gld.h sparc/elf.h sparc/rtemself.h rtems.h"
tmake_file="sparc/t-elf sparc/t-crtfm t-rtems"
extra_parts="crti.o crtn.o crtbegin.o crtend.o"
;;
@@ -2106,13 +2124,13 @@ sparclite-*-coff*)
tmake_file=sparc/t-sparclite
;;
sparclite-*-elf*)
- tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h sparc/elf.h sparc/liteelf.h"
+ tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h sparc/sol2-gld.h sparc/elf.h sparc/liteelf.h"
tmake_file="sparc/t-sparclite sparc/t-crtfm"
extra_parts="crtbegin.o crtend.o"
use_fixproto=yes
;;
sparc86x-*-elf*)
- tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h sparc/elf.h sparc/sp86x-elf.h"
+ tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h sparc/sol2-gld.h sparc/elf.h sparc/sp86x-elf.h"
tmake_file="sparc/t-sp86x sparc/t-crtfm"
extra_parts="crtbegin.o crtend.o"
use_fixproto=yes
@@ -2122,7 +2140,7 @@ sparc64-*-aout*)
use_fixproto=yes
;;
sparc64-*-elf*)
- tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h sparc/sp64-elf.h"
+ tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h sparc/sol2-gld.h sparc/sp64-elf.h"
tmake_file="${tmake_file} sparc/t-crtfm"
extra_parts="crtbegin.o crtend.o"
use_fixproto=yes
@@ -2398,24 +2416,24 @@ if test x$with_cpu = x ; then
esac
fi
- # Similarly for --with-schedule.
- if test x$with_schedule = x; then
- case ${target} in
- hppa1* | parisc1*)
- # Override default PA8000 scheduling model.
- with_schedule=7100LC
- ;;
- esac
- fi
+# Similarly for --with-schedule.
+if test x$with_schedule = x; then
+ case ${target} in
+ hppa1* | parisc1*)
+ # Override default PA8000 scheduling model.
+ with_schedule=7100LC
+ ;;
+ esac
+fi
- # Validate and mark as valid any --with options supported
- # by this target. In order to use a particular --with option
- # you must list it in supported_defaults; validating the value
- # is optional. This case statement should set nothing besides
- # supported_defaults.
+# Validate and mark as valid any --with options supported
+# by this target. In order to use a particular --with option
+# you must list it in supported_defaults; validating the value
+# is optional. This case statement should set nothing besides
+# supported_defaults.
- supported_defaults=
- case "${target}" in
+supported_defaults=
+case "${target}" in
alpha*-*-*)
supported_defaults="cpu tune"
for which in cpu tune; do
@@ -2569,8 +2587,7 @@ fi
eval $with_which=
;;
"" | common \
- | power | power2 | power3 | power4 \
- | powerpc | powerpc64 \
+ | power | power[2345] | powerpc | powerpc64 \
| rios | rios1 | rios2 | rsc | rsc1 | rs64a \
| 401 | 403 | 405 | 405fp | 440 | 440fp | 505 \
| 601 | 602 | 603 | 603e | ec603e | 604 \
@@ -2655,11 +2672,11 @@ fi
;;
esac
;;
- esac
+esac
- # Set some miscellaneous flags for particular targets.
- target_cpu_default2=
- case ${target} in
+# Set some miscellaneous flags for particular targets.
+target_cpu_default2=
+case ${target} in
alpha*-*-*)
if test x$gas = xyes
then
@@ -2771,44 +2788,45 @@ fi
;;
esac
;;
- esac
+esac
- t=
- all_defaults="abi cpu arch tune schedule float mode"
- for option in $all_defaults
- do
- eval "val=\$with_$option"
- if test -n "$val"; then
- case " $supported_defaults " in
- *" $option "*)
- ;;
- *)
- echo "This target does not support --with-$option." 2>&1
- exit 1
- ;;
- esac
+t=
+all_defaults="abi cpu arch tune schedule float mode"
+for option in $all_defaults
+do
+ eval "val=\$with_$option"
+ if test -n "$val"; then
+ case " $supported_defaults " in
+ *" $option "*)
+ ;;
+ *)
+ echo "This target does not support --with-$option." 2>&1
+ exit 1
+ ;;
+ esac
- if test "x$t" = x
- then
- t="{ \"$option\", \"$val\" }"
- else
- t="${t}, { \"$option\", \"$val\" }"
- fi
+ if test "x$t" = x
+ then
+ t="{ \"$option\", \"$val\" }"
+ else
+ t="${t}, { \"$option\", \"$val\" }"
fi
- done
- if test "x$t" = x
- then
- configure_default_options="{ { NULL, NULL} }"
- else
- configure_default_options="{ ${t} }"
fi
+done
+
+if test "x$t" = x
+then
+ configure_default_options="{ { NULL, NULL} }"
+else
+ configure_default_options="{ ${t} }"
+fi
- if test "$target_cpu_default2" != ""
+if test "$target_cpu_default2" != ""
+then
+ if test "$target_cpu_default" != ""
then
- if test "$target_cpu_default" != ""
- then
- target_cpu_default="(${target_cpu_default}|${target_cpu_default2})"
- else
- target_cpu_default=$target_cpu_default2
- fi
+ target_cpu_default="(${target_cpu_default}|${target_cpu_default2})"
+ else
+ target_cpu_default=$target_cpu_default2
fi
+fi