aboutsummaryrefslogtreecommitdiff
path: root/gcc/config.gcc
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2021-04-02 22:52:05 +0200
committerThomas Schwinge <thomas@codesourcery.com>2021-04-02 22:56:26 +0200
commit62550489ce87c5ec384611d40ff6d02fb6c3bf09 (patch)
tree9fd1f8ffea09aea7db96b83dced6753e7c07d525 /gcc/config.gcc
parente997db044394dd7ae751f52c209320a0097218be (diff)
parent7c1e856bedb4ae190c420ec2d2ca5e08730cf21d (diff)
downloadgcc-62550489ce87c5ec384611d40ff6d02fb6c3bf09.zip
gcc-62550489ce87c5ec384611d40ff6d02fb6c3bf09.tar.gz
gcc-62550489ce87c5ec384611d40ff6d02fb6c3bf09.tar.bz2
Merge commit '7c1e856bedb4ae190c420ec2d2ca5e08730cf21d' [#247]
Diffstat (limited to 'gcc/config.gcc')
-rw-r--r--gcc/config.gcc188
1 files changed, 112 insertions, 76 deletions
diff --git a/gcc/config.gcc b/gcc/config.gcc
index e4fd427..e04bb88 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -1,5 +1,5 @@
# GCC target-specific configuration file.
-# Copyright (C) 1997-2020 Free Software Foundation, Inc.
+# Copyright (C) 1997-2021 Free Software Foundation, Inc.
#This file is part of GCC.
@@ -332,7 +332,7 @@ aarch64*-*-*)
cxx_target_objs="aarch64-c.o"
d_target_objs="aarch64-d.o"
rust_target_objs="aarch64-rust.o"
- extra_objs="aarch64-builtins.o aarch-common.o aarch64-sve-builtins.o aarch64-sve-builtins-shapes.o aarch64-sve-builtins-base.o aarch64-sve-builtins-sve2.o cortex-a57-fma-steering.o aarch64-speculation.o falkor-tag-collision-avoidance.o aarch64-bti-insert.o"
+ extra_objs="aarch64-builtins.o aarch-common.o aarch64-sve-builtins.o aarch64-sve-builtins-shapes.o aarch64-sve-builtins-base.o aarch64-sve-builtins-sve2.o cortex-a57-fma-steering.o aarch64-speculation.o falkor-tag-collision-avoidance.o aarch64-bti-insert.o aarch64-cc-fusion.o"
target_gtfiles="\$(srcdir)/config/aarch64/aarch64-builtins.c \$(srcdir)/config/aarch64/aarch64-sve-builtins.h \$(srcdir)/config/aarch64/aarch64-sve-builtins.cc"
target_has_targetm_common=yes
;;
@@ -535,7 +535,8 @@ or1k*-*-*)
;;
powerpc*-*-*)
cpu_type=rs6000
- extra_objs="rs6000-string.o rs6000-p8swap.o rs6000-logue.o rs6000-call.o"
+ extra_objs="rs6000-string.o rs6000-p8swap.o rs6000-logue.o"
+ extra_objs="${extra_objs} rs6000-call.o rs6000-pcrel-opt.o"
extra_headers="ppc-asm.h altivec.h htmintrin.h htmxlintrin.h"
extra_headers="${extra_headers} bmi2intrin.h bmiintrin.h"
extra_headers="${extra_headers} xmmintrin.h mm_malloc.h emmintrin.h"
@@ -550,6 +551,7 @@ powerpc*-*-*)
esac
extra_options="${extra_options} g.opt fused-madd.opt rs6000/rs6000-tables.opt"
target_gtfiles="$target_gtfiles \$(srcdir)/config/rs6000/rs6000-logue.c \$(srcdir)/config/rs6000/rs6000-call.c"
+ target_gtfiles="$target_gtfiles \$(srcdir)/config/rs6000/rs6000-pcrel-opt.c"
;;
pru-*-*)
cpu_type=pru
@@ -562,8 +564,10 @@ riscv*)
;;
rs6000*-*-*)
extra_options="${extra_options} g.opt fused-madd.opt rs6000/rs6000-tables.opt"
- extra_objs="rs6000-string.o rs6000-p8swap.o rs6000-logue.o rs6000-call.o"
+ extra_objs="rs6000-string.o rs6000-p8swap.o rs6000-logue.o"
+ extra_objs="${extra_objs} rs6000-call.o rs6000-pcrel-opt.o"
target_gtfiles="$target_gtfiles \$(srcdir)/config/rs6000/rs6000-logue.c \$(srcdir)/config/rs6000/rs6000-call.c"
+ target_gtfiles="$target_gtfiles \$(srcdir)/config/rs6000/rs6000-pcrel-opt.c"
;;
sparc*-*-*)
cpu_type=sparc
@@ -702,7 +706,7 @@ c7 esther"
# 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 znver1 znver2 btver1 btver2 k8 k8-sse3 opteron \
+bdver3 bdver4 znver1 znver2 znver3 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 knm skylake-avx512 cannonlake icelake-client icelake-server \
@@ -719,25 +723,57 @@ case ${target} in
*-*-darwin*)
tmake_file="t-darwin "
tm_file="${tm_file} darwin.h"
+ darwin_os=`echo ${target} | sed 's/.*darwin\([0-9.]*\).*$/\1/'`
+ darwin_maj=`expr "$darwin_os" : '\([0-9]*\).*'`
+ macos_min=`expr "$darwin_os" : '[0-9]*\.\([0-9]*\).*'`
+ macos_maj=10
+ if test x"${macos_min}" = x; then
+ macos_min=0
+ fi
+ def_ld64=85.2
case ${target} in
- *-*-darwin9*)
- tm_file="${tm_file} darwin9.h"
- ;;
- *-*-darwin[1][01]*)
- tm_file="${tm_file} darwin9.h darwin10.h"
- ;;
- *-*-darwin[1][2-9]* | *-*-darwin[2][0-9]*)
- tm_file="${tm_file} darwin9.h darwin10.h darwin12.h"
- ;;
+ # Darwin 4 to 19 correspond to macOS 10.0 to 10.15
+ *-*-darwin[4-9]* | *-*-darwin1[0-9]*)
+ macos_min=`expr $darwin_maj - 4`
+ ;;
+ *-*-darwin20*)
+ # Darwin 20 corresponds to macOS 11.
+ macos_maj=11
+ def_ld64=609.0
+ ;;
+ *-*-darwin)
+ case ${cpu_type} in
+ aarch64) macos_maj=11 ;;
+ x86_64) macos_min=6 ;;
+ *) macos_min=5 ;;
+ esac
+ case ${host} in
+ *-*-darwin*) tm_defines="$tm_defines DARWIN_USE_KERNEL_VERS" ;;
+ *)
+ # If configuring a cross-compiler then we will have set some
+ # default above, but it is probably not what was intended.
+ echo "Warning: Using ${target} is only suitable for Darwin hosts" 1>&2
+ echo "configure with an explicit target version" 1>&2
+ ;;
+ esac
+ ;;
+ *)
+ echo "Error: configuring for an unreleased macOS version ${target}" 1>&2
+ exit 1
+ ;;
esac
+ tm_defines="$tm_defines DEF_MIN_OSX_VERSION=\\\"${macos_maj}.${macos_min}\\\""
+ tm_defines="$tm_defines DEF_LD64=\\\"${def_ld64}\\\""
tm_file="${tm_file} ${cpu_type}/darwin.h"
tm_p_file="${tm_p_file} darwin-protos.h"
target_gtfiles="$target_gtfiles \$(srcdir)/config/darwin.c"
extra_options="${extra_options} darwin.opt"
c_target_objs="${c_target_objs} darwin-c.o"
cxx_target_objs="${cxx_target_objs} darwin-c.o"
+ d_target_objs="${d_target_objs} darwin-d.o"
fortran_target_objs="darwin-f.o"
target_has_targetcm=yes
+ target_has_targetdm=yes
extra_objs="${extra_objs} darwin.o"
extra_gcc_objs="darwin-driver.o"
default_use_cxa_atexit=yes
@@ -816,6 +852,9 @@ case ${target} in
default_use_cxa_atexit=yes;;
esac
use_gcc_stdint=wrap
+ d_target_objs="${d_target_objs} freebsd-d.o"
+ tmake_file="${tmake_file} t-freebsd"
+ target_has_targetdm=yes
;;
*-*-fuchsia*)
native_system_header_dir=/include
@@ -1089,7 +1128,7 @@ aarch64*-*-elf | aarch64*-*-fuchsia* | aarch64*-*-rtems*)
tm_file="${tm_file} fuchsia.h"
;;
aarch64-*-rtems*)
- tm_file="${tm_file} rtems.h aarch64/rtems.h"
+ tm_file="${tm_file} aarch64/rtems.h rtems.h"
;;
esac
case $target in
@@ -1363,7 +1402,7 @@ arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtems* | arm*-*-fuchsia*)
target_cpu_cname="generic-armv7-a"
;;
arm*-*-rtems*)
- tm_file="${tm_file} rtems.h arm/rtems.h newlib-stdint.h"
+ tm_file="${tm_file} arm/rtems.h rtems.h newlib-stdint.h"
tmake_file="${tmake_file} arm/t-bpabi arm/t-rtems"
;;
arm*-*-symbianelf*)
@@ -1627,7 +1666,7 @@ epiphany-*-elf | epiphany-*-rtems*)
tmake_file="${tmake_file} epiphany/t-epiphany"
case ${target} in
epiphany-*-rtems*)
- tm_file="${tm_file} rtems.h epiphany/rtems.h newlib-stdint.h"
+ tm_file="${tm_file} epiphany/rtems.h rtems.h newlib-stdint.h"
;;
*)
tm_file="${tm_file} newlib-stdint.h"
@@ -2466,6 +2505,11 @@ riscv*-*-linux*)
tmake_file="${tmake_file} riscv/t-riscv riscv/t-linux"
gnu_ld=yes
gas=yes
+ case $target in
+ riscv32be-*|riscv64be-*)
+ tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
+ ;;
+ esac
# Force .init_array support. The configure script cannot always
# automatically detect that GAS supports it, yet we require it.
gcc_cv_initfini_array=yes
@@ -2474,7 +2518,7 @@ riscv*-*-elf* | riscv*-*-rtems*)
tm_file="elfos.h newlib-stdint.h ${tm_file} riscv/elf.h"
case ${target} in
*-*-rtems*)
- tm_file="${tm_file} rtems.h riscv/rtems.h"
+ tm_file="${tm_file} riscv/rtems.h rtems.h"
tmake_file="${tmake_file} riscv/t-rtems"
;;
*)
@@ -2489,6 +2533,11 @@ riscv*-*-elf* | riscv*-*-rtems*)
tmake_file="${tmake_file} riscv/t-riscv"
gnu_ld=yes
gas=yes
+ case $target in
+ riscv32be-*|riscv64be-*)
+ tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
+ ;;
+ esac
# Force .init_array support. The configure script cannot always
# automatically detect that GAS supports it, yet we require it.
gcc_cv_initfini_array=yes
@@ -2498,6 +2547,11 @@ riscv*-*-freebsd*)
tmake_file="${tmake_file} riscv/t-riscv"
gnu_ld=yes
gas=yes
+ case $target in
+ riscv32be-*|riscv64be-*)
+ tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
+ ;;
+ esac
# Force .init_array support. The configure script cannot always
# automatically detect that GAS supports it, yet we require it.
gcc_cv_initfini_array=yes
@@ -2877,7 +2931,6 @@ powerpc-*-darwin*)
*-darwin8*)
tmake_file="${tmake_file} ${cpu_type}/t-darwin32-biarch"
tm_file="${tm_file} ${cpu_type}/darwin32-biarch.h"
- tm_file="${tm_file} ${cpu_type}/darwin8.h"
;;
*-darwin7*)
tm_file="${tm_file} ${cpu_type}/darwin7.h"
@@ -2899,6 +2952,10 @@ powerpc*-*-freebsd*)
extra_options="${extra_options} rs6000/sysv4.opt"
tmake_file="rs6000/t-fprules rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm"
case ${target} in
+ powerpc*le-*-*)
+ tm_file="${tm_file} rs6000/sysv4le.h" ;;
+ esac
+ case ${target} in
powerpc64*)
tm_file="${tm_file} rs6000/default64.h rs6000/freebsd64.h"
tmake_file="${tmake_file} rs6000/t-freebsd64"
@@ -3473,7 +3530,7 @@ tilepro*-*-linux*)
v850-*-rtems*)
target_cpu_default="TARGET_CPU_generic"
tm_file="dbxelf.h elfos.h v850/v850.h"
- tm_file="${tm_file} rtems.h v850/rtems.h newlib-stdint.h"
+ tm_file="${tm_file} v850/rtems.h rtems.h newlib-stdint.h"
tmake_file="${tmake_file} v850/t-v850"
tmake_file="${tmake_file} v850/t-rtems"
use_collect2=no
@@ -3599,7 +3656,9 @@ esac
case ${target} in
*-*-linux*android*|*-*-linux*uclibc*|*-*-linux*musl*)
;;
-*-*-linux*)
+*-*-kfreebsd*-gnu | *-*-kopensolaris*-gnu)
+ ;;
+*-*-linux* | *-*-gnu*)
case ${target} in
aarch64*-* | arm*-* | i[34567]86-* | powerpc*-* | s390*-* | sparc*-* | x86_64-*)
default_gnu_indirect_function=yes
@@ -3717,6 +3776,10 @@ case ${target} in
arch=znver2
cpu=znver2
;;
+ znver3-*)
+ arch=znver3
+ cpu=znver3
+ ;;
bdver4-*)
arch=bdver4
cpu=bdver4
@@ -3838,6 +3901,10 @@ case ${target} in
arch=znver2
cpu=znver2
;;
+ znver3-*)
+ arch=znver3
+ cpu=znver3
+ ;;
bdver4-*)
arch=bdver4
cpu=bdver4
@@ -4130,25 +4197,16 @@ fi
supported_defaults=
case "${target}" in
aarch64*-*-*)
- supported_defaults="abi cpu cpu_32 cpu_64 arch arch_32 arch_64 tune tune_32 tune_64"
+ supported_defaults="abi cpu cpu_64 arch arch_64 tune tune_64"
if test x$with_cpu_64 != x && test x$with_cpu = x; then
with_cpu=$with_cpu_64
fi
- if test x$with_cpu_32 != x && test x$with_cpu = x; then
- with_cpu=$with_cpu_32
- fi
if test x$with_arch_64 != x && test x$with_arch = x; then
with_arch=$with_arch_64
fi
- if test x$with_arch_32 != x && test x$with_arch = x; then
- with_arch=$with_arch_32
- fi
if test x$with_tune_64 != x && test x$with_tune = x; then
with_tune=$with_tune_64
fi
- if test x$with_tune_32 != x && test x$with_tune = x; then
- with_tune=$with_tune_32
- fi
for which in cpu arch tune; do
eval "val=\$with_$which"
base_val=`echo $val | sed -e 's/\+.*//'`
@@ -4188,6 +4246,12 @@ case "${target}" in
sed -e 's/,.*$//'`
fi
+ # Disallow extensions in --with-tune=cortex-a53+crc.
+ if [ $which = tune ] && [ x"$ext_val" != x ]; then
+ echo "Architecture extensions not supported in --with-$which=$val" 1>&2
+ exit 1
+ fi
+
# Use the pre-processor to strip flatten the options.
# This makes the format less rigid than if we use
# grep and sed directly here.
@@ -4245,8 +4309,13 @@ case "${target}" in
fi
true
else
- echo "Unknown $which used in --with-$which=$val" 1>&2
- exit 1
+ # Allow --with-$which=native.
+ if [ "$val" = native ]; then
+ true
+ else
+ echo "Unknown $which used in --with-$which=$val" 1>&2
+ exit 1
+ fi
fi
done
;;
@@ -4548,10 +4617,8 @@ case "${target}" in
case " $x86_64_archs " in
*" ${val} "*)
# Disallow x86-64-v* for --with-cpu=/--with-tune=
- # or --with-arch= or --with-arch_32=
- # It can be only specified in --with-arch_64=
case "x$which$val" in
- xcpu*x86-64-v*|xtune*x86-64-v*|xarchx86-64-v*|xarch_32x86-64-v*)
+ xcpu*x86-64-v*|xtune*x86-64-v*)
echo "Unknown CPU given in --with-$which=$val." 1>&2
exit 1
;;
@@ -4654,6 +4721,11 @@ case "${target}" in
exit 1
;;
esac
+ PYTHON=`which python || which python3 || which python2`
+ if test "x${PYTHON}" != x; then
+ with_arch=`${PYTHON} ${srcdir}/config/riscv/arch-canonicalize ${with_arch}`
+ fi
+ tm_defines="${tm_defines} TARGET_RISCV_DEFAULT_ARCH=${with_arch}"
# Make sure --with-abi is valid. If it was not specified,
# pick a default based on the ISA, preferring soft-float
@@ -4675,6 +4747,7 @@ case "${target}" in
exit 1
;;
esac
+ tm_defines="${tm_defines} TARGET_RISCV_DEFAULT_ABI=${with_abi}"
# Make sure ABI and ISA are compatible.
case "${with_abi},${with_arch}" in
@@ -4717,7 +4790,6 @@ case "${target}" in
# Handle --with-multilib-list.
if test "x${with_multilib_list}" != xdefault; then
- tm_file="${tm_file} riscv/withmultilib.h"
tmake_file="${tmake_file} riscv/t-withmultilib"
case ${with_multilib_list} in
@@ -4729,42 +4801,6 @@ case "${target}" in
echo "--with-multilib-list=${with_multilib_list} not supported."
exit 1
esac
-
- # Define macros to select the default multilib.
- case ${with_arch} in
- rv32gc)
- tm_defines="${tm_defines} TARGET_MLIB_ARCH=1"
- ;;
- rv64gc)
- tm_defines="${tm_defines} TARGET_MLIB_ARCH=2"
- ;;
- *)
- echo "unsupported --with-arch for --with-multilib-list"
- exit 1
- esac
- case ${with_abi} in
- ilp32)
- tm_defines="${tm_defines} TARGET_MLIB_ABI=1"
- ;;
- ilp32f)
- tm_defines="${tm_defines} TARGET_MLIB_ABI=2"
- ;;
- ilp32d)
- tm_defines="${tm_defines} TARGET_MLIB_ABI=3"
- ;;
- lp64)
- tm_defines="${tm_defines} TARGET_MLIB_ABI=4"
- ;;
- lp64f)
- tm_defines="${tm_defines} TARGET_MLIB_ABI=5"
- ;;
- lp64d)
- tm_defines="${tm_defines} TARGET_MLIB_ABI=6"
- ;;
- *)
- echo "unsupported --with-abi for --with-multilib"
- exit 1
- esac
fi
;;
@@ -5144,7 +5180,7 @@ case "${target}" in
for which in arch tune; do
eval "val=\$with_$which"
case ${val} in
- "" | native | z900 | z990 | z9-109 | z9-ec | z10 | z196 | zEC12 | z13 | z14 | z15 | arch5 | arch6 | arch7 | arch8 | arch9 | arch10 | arch11 | arch12 | arch13 )
+ "" | native | z900 | z990 | z9-109 | z9-ec | z10 | z196 | zEC12 | z13 | z14 | z15 | arch5 | arch6 | arch7 | arch8 | arch9 | arch10 | arch11 | arch12 | arch13 | arch14 )
# OK
;;
*)
@@ -5305,8 +5341,8 @@ case ${target} in
i[34567]86-*-darwin* | x86_64-*-darwin*)
;;
i[34567]86-*-linux* | x86_64-*-linux*)
- extra_objs="${extra_objs} cet.o"
- tmake_file="$tmake_file i386/t-linux i386/t-cet"
+ extra_objs="${extra_objs} gnu-property.o"
+ tmake_file="$tmake_file i386/t-linux i386/t-gnu-property"
;;
i[34567]86-*-kfreebsd*-gnu | x86_64-*-kfreebsd*-gnu)
tmake_file="$tmake_file i386/t-kfreebsd"