diff options
Diffstat (limited to 'gcc/config.gcc')
-rw-r--r-- | gcc/config.gcc | 161 |
1 files changed, 104 insertions, 57 deletions
diff --git a/gcc/config.gcc b/gcc/config.gcc index 411200d..70ecc51 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -414,7 +414,7 @@ i[34567]86-*-*) avx512vp2intersectintrin.h avx512vp2intersectvlintrin.h tsxldtrkintrin.h amxtileintrin.h amxint8intrin.h amxbf16intrin.h x86gprintrin.h uintrintrin.h - hresetintrin.h" + hresetintrin.h keylockerintrin.h avxvnniintrin.h" ;; x86_64-*-*) cpu_type=i386 @@ -451,7 +451,7 @@ x86_64-*-*) avx512vp2intersectintrin.h avx512vp2intersectvlintrin.h tsxldtrkintrin.h amxtileintrin.h amxint8intrin.h amxbf16intrin.h x86gprintrin.h uintrintrin.h - hresetintrin.h" + hresetintrin.h keylockerintrin.h avxvnniintrin.h" ;; ia64-*-*) extra_headers=ia64intrin.h @@ -668,7 +668,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 \ @@ -702,8 +702,10 @@ case ${target} in 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 @@ -731,6 +733,9 @@ case ${target} in extra_options="$extra_options rpath.opt dragonfly.opt" default_use_cxa_atexit=yes use_gcc_stdint=wrap + d_target_objs="${d_target_objs} dragonfly-d.o" + tmake_file="${tmake_file} t-dragonfly" + target_has_targetdm=yes ;; *-*-freebsd*) # This is the generic ELF configuration of FreeBSD. Later @@ -779,6 +784,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 @@ -2050,7 +2058,7 @@ i[34567]86-*-solaris2* | x86_64-*-solaris2*) esac fi ;; -i[4567]86-wrs-vxworks|i[4567]86-wrs-vxworksae|i[4567]86-wrs-vxworks7|x86_64-wrs-vxworks7) +i[4567]86-wrs-vxworks*|x86_64-wrs-vxworks7*) tm_file="${tm_file} i386/unix.h i386/att.h elfos.h" case ${target} in x86_64-*) @@ -2438,11 +2446,13 @@ riscv*-*-elf* | riscv*-*-rtems*) tmake_file="${tmake_file} riscv/t-rtems" ;; *) - case "x${enable_multilib}" in - xno) ;; - xyes) tmake_file="${tmake_file} riscv/t-elf-multilib" ;; - *) echo "Unknown value for enable_multilib"; exit 1 - esac + if test "x${with_multilib_generator}" == xdefault; then + case "x${enable_multilib}" in + xno) ;; + xyes) tmake_file="${tmake_file} riscv/t-elf-multilib" ;; + *) echo "Unknown value for enable_multilib"; exit 1 + esac + fi esac tmake_file="${tmake_file} riscv/t-riscv" gnu_ld=yes @@ -2856,6 +2866,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" @@ -3668,6 +3682,10 @@ case ${target} in arch=znver2 cpu=znver2 ;; + znver3-*) + arch=znver3 + cpu=znver3 + ;; bdver4-*) arch=bdver4 cpu=bdver4 @@ -3789,6 +3807,10 @@ case ${target} in arch=znver2 cpu=znver2 ;; + znver3-*) + arch=znver3 + cpu=znver3 + ;; bdver4-*) arch=bdver4 cpu=bdver4 @@ -4081,9 +4103,17 @@ fi supported_defaults= case "${target}" in aarch64*-*-*) - supported_defaults="abi cpu arch" - for which in cpu arch; do - + 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_arch_64 != x && test x$with_arch = x; then + with_arch=$with_arch_64 + fi + if test x$with_tune_64 != x && test x$with_tune = x; then + with_tune=$with_tune_64 + fi + for which in cpu arch tune; do eval "val=\$with_$which" base_val=`echo $val | sed -e 's/\+.*//'` ext_val=`echo $val | sed -e 's/[a-z0-9.-]\+//'` @@ -4122,6 +4152,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. @@ -4179,8 +4215,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 ;; @@ -4482,10 +4523,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 ;; @@ -4522,7 +4561,7 @@ case "${target}" in ;; riscv*-*-*) - supported_defaults="abi arch tune riscv_attribute" + supported_defaults="abi arch tune riscv_attribute isa_spec" case "${target}" in riscv-* | riscv32*) xlen=32 ;; @@ -4530,6 +4569,21 @@ case "${target}" in *) echo "Unsupported RISC-V target ${target}" 1>&2; exit 1 ;; esac + case "${with_isa_spec}" in + ""|default|2.2) + tm_defines="${tm_defines} TARGET_DEFAULT_ISA_SPEC=ISA_SPEC_CLASS_2P2" + ;; + 20191213 | 201912) + tm_defines="${tm_defines} TARGET_DEFAULT_ISA_SPEC=ISA_SPEC_CLASS_20191213" + ;; + 20190608 | 201906) + tm_defines="${tm_defines} TARGET_DEFAULT_ISA_SPEC=ISA_SPEC_CLASS_20190608" + ;; + *) + echo "--with-isa-spec only accept 2.2, 20191213, 201912, 20190608 or 201906" 1>&2 + exit 1 + esac + case "${with_riscv_attribute}" in yes) tm_defines="${tm_defines} TARGET_RISCV_ATTRIBUTE=1" @@ -4573,6 +4627,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 @@ -4594,6 +4653,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 @@ -4609,10 +4669,33 @@ case "${target}" in exit 1 ;; esac + # Handle --with-multilib-generator. + if test "x${with_multilib_generator}" != xdefault; then + if test "x${with_multilib_list}" != xdefault; then + echo "--with-multilib-list= can't used with --with-multilib-generator= at same time" 1>&2 + exit 1 + fi + case "${target}" in + riscv*-*-elf*) + if ${srcdir}/config/riscv/multilib-generator \ + `echo ${with_multilib_generator} | sed 's/;/ /g'`\ + > t-multilib-config; + then + tmake_file="${tmake_file} riscv/t-withmultilib-generator" + else + echo "invalid option for --with-multilib-generator" 1>&2 + exit 1 + fi + ;; + *) + echo "--with-multilib-generator= is not supported for ${target}, only supported for riscv*-*-elf*" 1>&2 + exit 1 + ;; + esac + fi # 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 @@ -4624,42 +4707,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 ;; @@ -5200,8 +5247,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" |