aboutsummaryrefslogtreecommitdiff
path: root/gcc/config.gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config.gcc')
-rw-r--r--gcc/config.gcc166
1 files changed, 92 insertions, 74 deletions
diff --git a/gcc/config.gcc b/gcc/config.gcc
index 433db7f88bb..d67c66c1cdc 100644
--- a/gcc/config.gcc
+++ b/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
@@ -724,7 +730,7 @@ arm*-*-eabi* | arm*-*-symbianelf* )
;;
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 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"
@@ -744,12 +750,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 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"
@@ -1735,21 +1745,17 @@ 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*|powerpc-wrs-linux-gnu)
- 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"
- tmake_file="rs6000/t-fprules t-slibgcc-elf-ver t-linux rs6000/t-ppccomm"
+powerpc64-*-linux*)
+ 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"
case ${target} in
powerpc-wrs-linux-gnu)
# This configuration does not use t-linux64, as there
@@ -1831,8 +1837,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"
@@ -2073,7 +2091,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
@@ -2083,7 +2101,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"
;;
@@ -2172,13 +2190,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
@@ -2188,7 +2206,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
@@ -2473,24 +2491,24 @@ if test x$with_float = 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
@@ -2664,8 +2682,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 \
@@ -2750,11 +2767,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
@@ -2862,44 +2879,45 @@ fi
;;
esac
;;
- esac
+esac
- t=
- all_defaults="abi cpu arch tune schedule float mode fpu"
- 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 fpu"
+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