Commit 83079d89 by Daniel Jacobowitz Committed by Daniel Jacobowitz

* config.gcc: Only process --with-cpu logic in the third pass.

From-SVN: r67456
parent 73f09c99
2003-06-04 Daniel Jacobowitz <drow@mvista.com> 2003-06-04 Daniel Jacobowitz <drow@mvista.com>
* config.gcc: Only process --with-cpu logic in the third pass.
2003-06-04 Daniel Jacobowitz <drow@mvista.com>
* config.gcc: Reorganize --with-cpu section. Remove an * config.gcc: Reorganize --with-cpu section. Remove an
obsolete comment about the default CPU for x86-64. Fix obsolete comment about the default CPU for x86-64. Fix
a typo for the ep9312. Update the list of supported PowerPC a typo for the ep9312. Update the list of supported PowerPC
......
...@@ -2130,372 +2130,375 @@ case $machine in ...@@ -2130,372 +2130,375 @@ case $machine in
esac esac
# Support for --with-cpu and related options (and a few unrelated options, # Support for --with-cpu and related options (and a few unrelated options,
# too). # too). Only do this if $machine is the target, or we'll try to validate
# the CPU argument against the wrong machine type.
case "x$with_cpu" in if test "x$pass2done" = xyes
xyes | xno)
echo "--with-cpu must be passed a value" 1>&2
exit 1
;;
esac
# If there is no $with_cpu option, try to infer one from ${machine}.
# This block sets nothing except for with_cpu.
if test x$with_cpu = x
then then
case $machine in case "x$with_cpu" in
ep9312-*-*) xyes | xno)
# A Cirrus ARM variant. echo "--with-cpu must be passed a value" 1>&2
with_cpu="ep9312" exit 1
;;
i486-*-*)
with_cpu=i486
;; ;;
i586-*-*) esac
case $target_alias in
k6_2-*) # If there is no $with_cpu option, try to infer one from ${machine}.
with_cpu=k6-2 # This block sets nothing except for with_cpu.
;; if test x$with_cpu = x
k6_3-*) then
with_cpu=k6-3 case $machine in
ep9312-*-*)
# A Cirrus ARM variant.
with_cpu="ep9312"
;; ;;
k6-*) i486-*-*)
with_cpu=k6 with_cpu=i486
;; ;;
pentium_mmx-*|winchip_c6-*|winchip2-*|c3-*) i586-*-*)
with_cpu=pentium-mmx case $target_alias in
k6_2-*)
with_cpu=k6-2
;;
k6_3-*)
with_cpu=k6-3
;;
k6-*)
with_cpu=k6
;;
pentium_mmx-*|winchip_c6-*|winchip2-*|c3-*)
with_cpu=pentium-mmx
;;
*)
with_cpu=pentium
;;
esac
;; ;;
*) i686-*-* | i786-*-*)
with_cpu=pentium case $target_alias in
k8-*)
with_cpu=k8
;;
athlon_xp-*|athlon_mp-*|athlon_4-*)
with_cpu=athlon-4
;;
athlon_tbird-*|athlon-*)
with_cpu=athlon
;;
pentium2-*)
with_cpu=pentium2
;;
pentium3-*)
with_cpu=pentium3
;;
pentium4-*)
with_cpu=pentium4
;;
*)
with_cpu=pentiumpro
;;
esac
;; ;;
esac x86_64-*-*)
;;
i686-*-* | i786-*-*)
case $target_alias in
k8-*)
with_cpu=k8 with_cpu=k8
;; ;;
athlon_xp-*|athlon_mp-*|athlon_4-*) alpha*-*-*)
with_cpu=athlon-4 case $machine in
;; alphaev6[78]*)
athlon_tbird-*|athlon-*) with_cpu=ev67
with_cpu=athlon ;;
alphaev6*)
with_cpu=ev6
;;
alphapca56*)
with_cpu=pca56
;;
alphaev56*)
with_cpu=ev56
;;
alphaev5*)
with_cpu=ev5
;;
esac
;; ;;
pentium2-*) sparc*-*-*)
with_cpu=pentium2 with_cpu="`echo $machine | sed 's/-.*$//'`"
;; ;;
pentium3-*) esac
with_cpu=pentium3 fi
# Similarly for --with-schedule.
if test x$with_schedule = x; then
case $machine in
hppa1* | parisc1*)
# Override default PA8000 scheduling model.
with_schedule=7100LC
;; ;;
pentium4-*) esac
with_cpu=pentium4 fi
# Optionally, validate the argument to --with-cpu.
# This block sets nothing.
case $machine in
alpha*-*-*)
case "x$with_cpu" in
x \
| xev5 | xev56 | xpca56 | xev6 | xev67)
# OK
;; ;;
*) *)
with_cpu=pentiumpro echo "Unknown CPU used in --with-cpu=$with_cpu" 1>&2
exit 1
;; ;;
esac esac
;; ;;
x86_64-*-*)
with_cpu=k8 arm*-*-*)
;; case "x$with_cpu" in
alpha*-*-*) x \
case $machine in | xarm[236789] | xarm250 | xarm[67][01]0 \
alphaev6[78]*) | xarm7m | xarm7dm | xarm7dmi | xarm[79]tdmi \
with_cpu=ev67 | xarm7100 | xarm7500 | xarm7500fe | xarm810 \
;; | xxscale \
alphaev6*) | xep9312 \
with_cpu=ev6 | xstrongarm | xstrongarm110 | xstrongarm1100)
;; # OK
alphapca56*)
with_cpu=pca56
;;
alphaev56*)
with_cpu=ev56
;; ;;
alphaev5*) *)
with_cpu=ev5 echo "Unknown cpu used in --with-cpu=$with_cpu" 1>&2
exit 1
;; ;;
esac esac
;; ;;
sparc*-*-*)
with_cpu="`echo $machine | sed 's/-.*$//'`"
;;
esac
fi
# Similarly for --with-schedule. hppa*-*-* | parisc*-*-*)
if test x$with_schedule = x; then case "x$with_schedule" in
case $machine in x | x700 | x7100 | x7100LC | x7200 | x7300 | x8000)
hppa1* | parisc1*) # OK
# Override default PA8000 scheduling model. ;;
with_schedule=7100LC *)
echo "Unknown processor used in --with-schedule=$with_schedule." 1>&2
exit 1
;;
esac
;; ;;
esac
fi
# Optionally, validate the argument to --with-cpu. i[34567]86-*-* | x86_64-*-*)
# This block sets nothing. case x$with_cpu in
case $machine in x \
alpha*-*-*) | xi486 \
case "x$with_cpu" in | xi586 | xk6 | xk6-2 | xk6-3 | xpentium-mmx | xpentium \
x \ | xpentiumpro | xpentium2 | xpentium3 | xpentium4 \
| xev5 | xev56 | xpca56 | xev6 | xev67) | xathlon | xathlon-4 | xk8)
# OK # OK
;; ;;
*) *)
echo "Unknown CPU used in --with-cpu=$with_cpu" 1>&2 echo "Unknown CPU given in --with-cpu=$with_cpu." 1>&2
exit 1 exit 1
;;
esac
;; ;;
esac
;;
arm*-*-*) powerpc*-*-* | rs6000-*-*)
case "x$with_cpu" in case "x$with_cpu" in
x \ x \
| xarm[236789] | xarm250 | xarm[67][01]0 \ | xdefault32 | xdefault64 \
| xarm7m | xarm7dm | xarm7dmi | xarm[79]tdmi \ | xcommon \
| xarm7100 | xarm7500 | xarm7500fe | xarm810 \ | xpower | xpower2 | xpower3 | xpower4 \
| xxscale \ | xpowerpc | xpowerpc64 \
| xep9312 \ | xrios | xrios1 | xrios2 | xrsc | xrsc1 | xrs64a \
| xstrongarm | xstrongarm110 | xstrongarm1100) | x401 | x403 | x405 | x405fp | x440 | x440fp | x505 \
# OK | x601 | x602 | x603 | x603e | xec603e | x604 \
;; | x604e | x620 | x630 | x740 | x750 | x7400 | x7450 \
*) | x8540 | x801 | x821 | x823 | x860)
echo "Unknown cpu used in --with-cpu=$with_cpu" 1>&2 # OK
exit 1 ;;
*)
echo "Unknown cpu used in --with-cpu=$with_cpu." 1>&2
exit 1
;;
esac
;; ;;
esac
;;
hppa*-*-* | parisc*-*-*) sparc*-*-*)
case "x$with_schedule" in case x$with_cpu in
x | x700 | x7100 | x7100LC | x7200 | x7300 | x8000) x)
# OK echo "Should never happen - no default CPU for sparc target."
;; exit 1
*) ;;
echo "Unknown processor used in --with-schedule=$with_schedule." 1>&2
exit 1
;;
esac
;;
i[34567]86-*-* | x86_64-*-*) xsparc | xsparc86x | xsparcv9 | xsparc64 \
case x$with_cpu in | xsupersparc | xhypersparc | xultrasparc | xv7 | xv8 | xv9)
x \ # OK
| xi486 \ ;;
| xi586 | xk6 | xk6-2 | xk6-3 | xpentium-mmx | xpentium \ *)
| xpentiumpro | xpentium2 | xpentium3 | xpentium4 \ echo "Unknown cpu used in --with-$which=$val" 1>&2
| xathlon | xathlon-4 | xk8) exit 1
# OK ;;
;; esac
*)
echo "Unknown CPU given in --with-cpu=$with_cpu." 1>&2
exit 1
;; ;;
esac
;;
powerpc*-*-* | rs6000-*-*) v850*-*-*)
case "x$with_cpu" in case "x$with_cpu" in
x \ x | xv850e)
| xdefault32 | xdefault64 \ # OK
| xcommon \ ;;
| xpower | xpower2 | xpower3 | xpower4 \ *)
| xpowerpc | xpowerpc64 \ echo "Unknown cpu used in --with-cpu=$with_cpu" 1>&2
| xrios | xrios1 | xrios2 | xrsc | xrsc1 | xrs64a \ exit 1
| x401 | x403 | x405 | x405fp | x440 | x440fp | x505 \ ;;
| x601 | x602 | x603 | x603e | xec603e | x604 \ esac
| x604e | x620 | x630 | x740 | x750 | x7400 | x7450 \
| x8540 | x801 | x821 | x823 | x860)
# OK
;;
*)
echo "Unknown cpu used in --with-cpu=$with_cpu." 1>&2
exit 1
;; ;;
esac esac
;;
sparc*-*-*)
case x$with_cpu in
x)
echo "Should never happen - no default CPU for sparc target."
exit 1
;;
xsparc | xsparc86x | xsparcv9 | xsparc64 \ # Now, for targets which support this, convert --with-cpu to
| xsupersparc | xhypersparc | xultrasparc | xv7 | xv8 | xv9) # a setting of target_cpu_default2. This block also sets assorted
# OK # other configuration variables.
;; target_cpu_default2=
*) case $machine in
echo "Unknown cpu used in --with-$which=$val" 1>&2 alpha*-*-*)
exit 1 case $with_cpu in
;; ev67)
esac target_cpu_default2="MASK_CPU_EV6|MASK_BWX|MASK_MAX|MASK_FIX|MASK_CIX"
;; ;;
ev6)
target_cpu_default2="MASK_CPU_EV6|MASK_BWX|MASK_MAX|MASK_FIX"
;;
pca56)
target_cpu_default2="MASK_CPU_EV5|MASK_BWX|MASK_MAX"
;;
ev56)
target_cpu_default2="MASK_CPU_EV5|MASK_BWX"
;;
ev5)
target_cpu_default2="MASK_CPU_EV5"
;;
esac
v850*-*-*) if test x$gas = xyes
case "x$with_cpu" in then
x | xv850e) if test "$target_cpu_default2" = ""
# OK then
;; target_cpu_default2="MASK_GAS"
*) else
echo "Unknown cpu used in --with-cpu=$with_cpu" 1>&2 target_cpu_default2="${target_cpu_default2}|MASK_GAS"
exit 1 fi
fi
;; ;;
esac
;;
esac
# Now, for targets which support this, convert --with-cpu to arm*-*-*)
# a setting of target_cpu_default2. This block also sets assorted case "x$with_cpu" in
# other configuration variables. x)
# The most generic
target_cpu_default2= target_cpu_default2="TARGET_CPU_generic"
case $machine in
alpha*-*-*)
case $with_cpu in
ev67)
target_cpu_default2="MASK_CPU_EV6|MASK_BWX|MASK_MAX|MASK_FIX|MASK_CIX"
;; ;;
ev6)
target_cpu_default2="MASK_CPU_EV6|MASK_BWX|MASK_MAX|MASK_FIX" *)
;; target_cpu_default2="TARGET_CPU_$with_cpu"
pca56)
target_cpu_default2="MASK_CPU_EV5|MASK_BWX|MASK_MAX"
;;
ev56)
target_cpu_default2="MASK_CPU_EV5|MASK_BWX"
;;
ev5)
target_cpu_default2="MASK_CPU_EV5"
;; ;;
esac esac
;;
if test x$gas = xyes hppa*-*-* | parisc*-*-*)
then if test x$gas = xyes
if test "$target_cpu_default2" = ""
then then
target_cpu_default2="MASK_GAS" target_cpu_default2="MASK_GAS|MASK_JUMP_IN_DELAY"
else fi
target_cpu_default2="${target_cpu_default2}|MASK_GAS" if test "x$with_schedule" != x
then
tm_defines="TARGET_SCHED_DEFAULT=\\\"$with_schedule\\\""
;;
fi fi
fi
;;
arm*-*-*)
case "x$with_cpu" in
x)
# The most generic
target_cpu_default2="TARGET_CPU_generic"
;;
*)
target_cpu_default2="TARGET_CPU_$with_cpu"
;;
esac
;;
hppa*-*-* | parisc*-*-*)
if test x$gas = xyes
then
target_cpu_default2="MASK_GAS|MASK_JUMP_IN_DELAY"
fi
if test "x$with_schedule" != x
then
tm_defines="TARGET_SCHED_DEFAULT=\\\"$with_schedule\\\""
;; ;;
fi
;;
i[34567]86-*-* | x86_64-*-*) i[34567]86-*-* | x86_64-*-*)
case x$with_cpu in case x$with_cpu in
xathlon-4) xathlon-4)
target_cpu_default2=TARGET_CPU_DEFAULT_athlon_sse target_cpu_default2=TARGET_CPU_DEFAULT_athlon_sse
;; ;;
*) *)
target_cpu_default2=TARGET_CPU_DEFAULT_"`echo $with_cpu | sed s/-/_/`" target_cpu_default2=TARGET_CPU_DEFAULT_"`echo $with_cpu | sed s/-/_/`"
;;
esac
;; ;;
esac
;;
mips*-*-*) mips*-*-*)
case $machine in case $machine in
mips*-*-ecoff* | mips*-*-elf*) mips*-*-ecoff* | mips*-*-elf*)
if test x$gas = xyes if test x$gas = xyes
then then
if test x$gnu_ld = xyes if test x$gnu_ld = xyes
then
target_cpu_default2="MASK_GAS|MASK_SPLIT_ADDR"
else
target_cpu_default2="MASK_GAS"
fi
fi
;;
mips*-*-*)
if test x$gas = xyes
then then
target_cpu_default2="MASK_GAS|MASK_SPLIT_ADDR"
else
target_cpu_default2="MASK_GAS" target_cpu_default2="MASK_GAS"
fi fi
;;
esac
case $machine in
mips*el-*-*)
tm_defines="TARGET_ENDIAN_DEFAULT=0 $tm_defines"
;;
esac
case $tm_file in
*mips/elf.h* | *mips/elf64.h*)
tm_defines="OBJECT_FORMAT_ELF $tm_defines"
;;
esac
if test "x$enable_gofast" = xyes
then
tm_defines="INIT_SUBTARGET_OPTABS=INIT_GOFAST_OPTABS $tm_defines"
tm_file="gofast.h $tm_file"
tmake_file="mips/t-gofast $tmake_file"
else
tmake_file="mips/t-mips $tmake_file"
fi fi
;; ;;
mips*-*-*)
if test x$gas = xyes powerpc*-*-* | rs6000-*-*)
if test x$enable_altivec = xyes
then
tm_file="$tm_file rs6000/altivec-defs.h"
fi
if test "x$with_cpu" != x
then then
target_cpu_default2="MASK_GAS" target_cpu_default2="\\\"$with_cpu\\\""
fi fi
out_file=rs6000/rs6000.c
c_target_objs="${c_target_objs} rs6000-c.o"
cxx_target_objs="${cxx_target_objs} rs6000-c.o"
tmake_file="rs6000/t-rs6000 ${tmake_file}"
;; ;;
esac
case $machine in
mips*el-*-*)
tm_defines="TARGET_ENDIAN_DEFAULT=0 $tm_defines"
;;
esac
case $tm_file in
*mips/elf.h* | *mips/elf64.h*)
tm_defines="OBJECT_FORMAT_ELF $tm_defines"
;;
esac
if test "x$enable_gofast" = xyes
then
tm_defines="INIT_SUBTARGET_OPTABS=INIT_GOFAST_OPTABS $tm_defines"
tm_file="gofast.h $tm_file"
tmake_file="mips/t-gofast $tmake_file"
else
tmake_file="mips/t-mips $tmake_file"
fi
;;
powerpc*-*-* | rs6000-*-*)
if test x$enable_altivec = xyes
then
tm_file="$tm_file rs6000/altivec-defs.h"
fi
if test "x$with_cpu" != x
then
target_cpu_default2="\\\"$with_cpu\\\""
fi
out_file=rs6000/rs6000.c
c_target_objs="${c_target_objs} rs6000-c.o"
cxx_target_objs="${cxx_target_objs} rs6000-c.o"
tmake_file="rs6000/t-rs6000 ${tmake_file}"
;;
sparc*-*-*) sparc*-*-*)
target_cpu_default2="TARGET_CPU_$with_cpu"
;;
v850*-*-*)
case "x$with_cpu" in
x)
;;
xv850e)
target_cpu_default2="TARGET_CPU_$with_cpu" target_cpu_default2="TARGET_CPU_$with_cpu"
;; ;;
v850*-*-*)
case "x$with_cpu" in
x)
;;
xv850e)
target_cpu_default2="TARGET_CPU_$with_cpu"
;;
esac
;;
esac esac
;;
esac
if test "$target_cpu_default2" != "" if test "$target_cpu_default2" != ""
then
if test "$target_cpu_default" != ""
then then
target_cpu_default="(${target_cpu_default}|${target_cpu_default2})" if test "$target_cpu_default" != ""
else then
target_cpu_default=$target_cpu_default2 target_cpu_default="(${target_cpu_default}|${target_cpu_default2})"
else
target_cpu_default=$target_cpu_default2
fi
fi fi
fi fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment