]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/config.gcc
Update copyright years.
[thirdparty/gcc.git] / gcc / config.gcc
index 69d0a024d850c7f7a7b6faa7975fc581c36f4a2c..c3d6464f3e6adaa1db818a61de00cff8e00ae08e 100644 (file)
@@ -1,5 +1,5 @@
 # GCC target-specific configuration file.
-# Copyright (C) 1997-2019 Free Software Foundation, Inc.
+# Copyright (C) 1997-2020 Free Software Foundation, Inc.
 
 #This file is part of GCC.
 
@@ -315,12 +315,12 @@ m32c*-*-*)
         ;;
 aarch64*-*-*)
        cpu_type=aarch64
-       extra_headers="arm_fp16.h arm_neon.h arm_acle.h"
+       extra_headers="arm_fp16.h arm_neon.h arm_acle.h arm_sve.h"
        c_target_objs="aarch64-c.o"
        cxx_target_objs="aarch64-c.o"
        d_target_objs="aarch64-d.o"
-       extra_objs="aarch64-builtins.o aarch-common.o cortex-a57-fma-steering.o aarch64-speculation.o falkor-tag-collision-avoidance.o aarch64-bti-insert.o"
-       target_gtfiles="\$(srcdir)/config/aarch64/aarch64-builtins.c"
+       extra_objs="aarch64-builtins.o aarch-common.o aarch64-sve-builtins.o aarch64-sve-builtins-shapes.o aarch64-sve-builtins-base.o cortex-a57-fma-steering.o aarch64-speculation.o falkor-tag-collision-avoidance.o aarch64-bti-insert.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
        ;;
 alpha*-*-*)
@@ -523,7 +523,7 @@ pru-*-*)
        ;;
 riscv*)
        cpu_type=riscv
-       extra_objs="riscv-builtins.o riscv-c.o"
+       extra_objs="riscv-builtins.o riscv-c.o riscv-sr.o"
        d_target_objs="riscv-d.o"
        ;;
 rs6000*-*-*)
@@ -953,15 +953,53 @@ case ${target} in
 *-*-vxworks*)
   tmake_file=t-vxworks
   xm_defines=POSIX
+
   extra_options="${extra_options} vxworks.opt"
   extra_objs="$extra_objs vxworks.o"
-  use_gcc_stdint=provide
+
+  c_target_objs="${c_target_objs} vxworks-c.o"
+  cxx_target_objs="${cxx_target_objs} vxworks-c.o"
+  extra_headers="${extra_headers} ../vxworks/vxworks-predef.h"
+  target_has_targetcm="yes"
+
+  # This private header exposes a consistent interface for checks on
+  # the VxWorks version our runtime header files need to perform, based on
+  # what the system headers adverstise:
+
+  extra_headers="${extra_headers} ../vxworks/_vxworks-versions.h"
+
+  # Starting from VxWorks 7, the system comes with a Dinkumware
+  # environment which requires the inclusion of "yvals.h" before other
+  # system headers.  We provide wrapped versions of a few headers to
+  # accomodate such constraints:
+
+  extra_headers="${extra_headers} ../vxworks/_yvals.h"
+  extra_headers="${extra_headers} ../vxworks/_yvals-wrapper.h"
+
+  extra_headers="${extra_headers} ../vxworks/math.h ../vxworks/complex.h"
+  extra_headers="${extra_headers} ../vxworks/inttypes.h ../vxworks/setjmp.h"
+
+  # We provide stdint.h ...
+
   tm_file="${tm_file} vxworks-stdint.h"
+
+  # .. only through the yvals conditional wrapping mentioned above
+  # to abide by the VxWorks 7 expectations.  The final copy is performed
+  # explicitly by a t-vxworks Makefile rule.
+
+  use_gcc_stdint=none
+  extra_headers="${extra_headers} ../../ginclude/stdint-gcc.h"
+
   case ${enable_threads} in
     no) ;;
     "" | yes | vxworks) thread_file='vxworks' ;;
     *) echo 'Unknown thread configuration for VxWorks'; exit 1 ;;
   esac
+
+  # A few common macro definitions conveying general characteristics
+  # of the configuration at hand. Note that by VxWorks 7, we mean the
+  # the SR6xx major update or beyond in vendor parlance:
+
   case $target in
     *-*-vxworks7*)
       tm_defines="$tm_defines TARGET_VXWORKS7=1"
@@ -972,6 +1010,18 @@ case ${target} in
       tm_defines="$tm_defines TARGET_VXWORKS64=1"
       ;;
   esac
+
+  # Then a few build configuration controls for VxWorks 7, which
+  # has specificities on top of which we aim to provide more complete
+  # C++ support:
+
+  case $target in
+    *-*-vxworks7*)
+      # VxWorks 7 always has init/fini_array support and it is simpler to
+      # just leverage this, sticking to what the system toolchain does:
+      gcc_cv_initfini_array=yes
+      ;;
+  esac
   ;;
 *-*-elf|arc*-*-elf*)
   # Assume that newlib is being used and so __cxa_atexit is provided.
@@ -1059,6 +1109,11 @@ aarch64*-*-linux*)
        done
        TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's/^,//'`
        ;;
+aarch64*-wrs-vxworks*)
+        tm_file="${tm_file} elfos.h aarch64/aarch64-elf.h"
+        tm_file="${tm_file} vx-common.h vxworks.h aarch64/aarch64-vxworks.h"
+        tmake_file="${tmake_file} aarch64/t-aarch64 aarch64/t-aarch64-vxworks"
+        ;;
 alpha*-*-linux*)
        tm_file="elfos.h ${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h glibc-stdint.h"
        tmake_file="${tmake_file} alpha/t-linux alpha/t-alpha"
@@ -1126,23 +1181,17 @@ arc*-*-linux*)
        # automatically detect that GAS supports it, yet we require it.
        gcc_cv_initfini_array=yes
        ;;
-arm-wrs-vxworks|arm-wrs-vxworks7)
+arm-wrs-vxworks7*)
+       # We only support VxWorks 7 now on ARM, post SR600.  Pre SR600
+       # VxWorks 7 was transitory and major versions prior to 7 were based
+       # on long deprecated ABI, not supported at all any more regardless
+       # of VxWorks.
        extra_options="${extra_options} arm/vxworks.opt"
-       tmake_file="${tmake_file} arm/t-arm arm/t-vxworks"
-        case $target in
-       *-vxworks7)
-            # VxWorks7 on ARM adheres to the ARM Base Platform ABI
-           tmake_file="${tmake_file} arm/t-bpabi"
-           tm_file="arm/bpabi.h ${tm_file}"
-           # The BPABI long long divmod functions return a 128-bit value in
-           # registers r0-r3.
-           need_64bit_hwint=yes
-           default_use_cxa_atexit=yes
-           ;;
-        *)  ;;
-        esac
-        tm_file="elfos.h arm/elf.h arm/aout.h ${tm_file} vx-common.h vxworks.h arm/vxworks.h"
-       target_cpu_cname="arm8"
+       tmake_file="${tmake_file} arm/t-arm arm/t-vxworks arm/t-bpabi"
+       tm_file="elfos.h arm/elf.h arm/bpabi.h arm/aout.h ${tm_file}"
+       tm_file="${tm_file} vx-common.h vxworks.h arm/vxworks.h"
+       target_cpu_cname="armv7-a"
+       need_64bit_hwint=yes
        ;;
 arm*-*-freebsd*)                # ARM FreeBSD EABI
        tm_file="dbxelf.h elfos.h ${fbsd_tm_file} arm/elf.h"
@@ -1287,6 +1336,88 @@ avr-*-*)
            tm_file="${tm_file} ${cpu_type}/avrlibc.h"
            tm_defines="${tm_defines} WITH_AVRLIBC"
        fi
+       case y${with_double} in
+           y | y32)
+               avr_double=32
+               tm_defines="${tm_defines} HAVE_DOUBLE32"
+               ;;
+           y64)
+               avr_double=64
+               tm_defines="${tm_defines} HAVE_DOUBLE64"
+               ;;
+           y64,32)
+               avr_double=64
+               avr_double_multilib=1
+               tm_defines="${tm_defines} HAVE_DOUBLE32"
+               tm_defines="${tm_defines} HAVE_DOUBLE64"
+               tm_defines="${tm_defines} HAVE_DOUBLE_MULTILIB"
+               ;;
+           y32,64)
+               avr_double=32
+               avr_double_multilib=1
+               tm_defines="${tm_defines} HAVE_DOUBLE32"
+               tm_defines="${tm_defines} HAVE_DOUBLE64"
+               tm_defines="${tm_defines} HAVE_DOUBLE_MULTILIB"
+               ;;
+           *)
+               echo "Error: --with-double= can only be used with: '32', '32,64', '64,32', '64'" 1>&2
+               exit 1
+               ;;
+       esac
+       case y${with_long_double} in
+           y | y32)
+               avr_long_double=32
+               tm_defines="${tm_defines} HAVE_LONG_DOUBLE32"
+               ;;
+           y64)
+               avr_long_double=64
+               tm_defines="${tm_defines} HAVE_LONG_DOUBLE64"
+               ;;
+           y64,32)
+               avr_long_double=64
+               avr_long_double_multilib=1
+               tm_defines="${tm_defines} HAVE_LONG_DOUBLE32"
+               tm_defines="${tm_defines} HAVE_LONG_DOUBLE64"
+               tm_defines="${tm_defines} HAVE_LONG_DOUBLE_MULTILIB"
+               ;;
+           y32,64)
+               avr_long_double=32
+               avr_long_double_multilib=1
+               tm_defines="${tm_defines} HAVE_LONG_DOUBLE32"
+               tm_defines="${tm_defines} HAVE_LONG_DOUBLE64"
+               tm_defines="${tm_defines} HAVE_LONG_DOUBLE_MULTILIB"
+               ;;
+           ydouble)
+               avr_long_double=${avr_double}
+               tm_defines="${tm_defines} HAVE_LONG_DOUBLE_IS_DOUBLE"
+               if test y${avr_double_multilib} = y1; then
+                   tm_defines="${tm_defines} HAVE_LONG_DOUBLE32"
+                   tm_defines="${tm_defines} HAVE_LONG_DOUBLE64"
+               else
+                   tm_defines="${tm_defines} HAVE_LONG_DOUBLE${avr_long_double}"
+               fi
+               ;;
+           *)
+               echo "Error: --with-long_double= can only be used with: '32', '32,64', '64,32', '64', 'double'" 1>&2
+               exit 1
+               ;;
+       esac
+       if test ${avr_long_double}x${avr_long_double_multilib}y${avr_double_multilib}z = 32xy1z; then
+           if test y${with_long_double} != ydouble; then
+               echo "Error: --with-double=${with_double} requests a multilib for double, but long double is always 32 bits wide due to --with-long-double=${with_long_double}" 1>&2
+               exit 1
+           fi
+       fi
+       if test ${avr_double}x${avr_long_double_multilib}y${avr_double_multilib}z = 64x1yz; then
+           echo "Error: --with-long-double=${with_long_double} requests a multilib for long double, but double is always 64 bits wide due to --with-double=64" 1>&2
+           exit 1
+       fi
+       if test y${avr_double}${avr_long_double} = y6432; then
+           echo "Error: double default of 64 bits from --with-double=${with_double} conflicts with default of 32 bits for long double from --with-long-double=${with_long_double}" 1>&2
+           exit 1
+       fi
+       tm_defines="${tm_defines} WITH_DOUBLE${avr_double}"
+       tm_defines="${tm_defines} WITH_LONG_DOUBLE${avr_long_double}"
        tmake_file="${tmake_file} avr/t-avr avr/t-multilib"
        use_gcc_stdint=wrap
        extra_gcc_objs="driver-avr.o avr-devices.o"
@@ -2526,7 +2657,7 @@ mn10300-*-*)
        use_collect2=no
        use_gcc_stdint=wrap
        ;;
-msp430*-*-*)
+msp430-*-*)
        tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
        c_target_objs="msp430-c.o"
        cxx_target_objs="msp430-c.o"
@@ -2539,6 +2670,18 @@ msp430*-*-*)
        if test x${disable_initfini_array} != xyes; then
                gcc_cv_initfini_array=yes
        fi
+       case ${target} in
+         msp430-*-elfbare)
+           # __cxa_atexit increases code size, and we don't need to support
+           # dynamic shared objects on MSP430, so regular Newlib atexit is a
+           # fine replacement as it also supports registration of more than 32
+           # functions.
+           default_use_cxa_atexit=no
+           # This target does not match the generic *-*-elf case above which
+           # sets use_gcc_stdint=wrap, so explicitly set it here.
+           use_gcc_stdint=wrap
+           ;;
+       esac
        ;;
 nds32*-*-*)
        target_cpu_default="0"
@@ -2687,8 +2830,14 @@ powerpc*-*-freebsd*)
                tm_file="${tm_file} rs6000/default64.h rs6000/freebsd64.h"
                tmake_file="${tmake_file} rs6000/t-freebsd64"
                extra_options="${extra_options} rs6000/linux64.opt"
+               if test $fbsd_major -ge 13; then
+                   tm_defines="${tm_defines} TARGET_FREEBSD32_SECURE_PLT=1"
+               fi
                ;;
             *)
+               if test $fbsd_major -ge 13; then
+                   tm_file="rs6000/secureplt.h ${tm_file}"
+               fi
                tm_file="${tm_file} rs6000/freebsd.h"
                ;;
        esac
@@ -2803,7 +2952,7 @@ powerpc-wrs-vxworks*)
        tm_file="${tm_file} elfos.h gnu-user.h freebsd-spec.h rs6000/sysv4.h"
        tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-ppccomm rs6000/t-vxworks"
        extra_options="${extra_options} rs6000/sysv4.opt"
-       extra_headers=ppc-asm.h
+       extra_headers="${extra_headers} ppc-asm.h"
        case ${target} in
           *-vxworksmils*)
             tm_file="${tm_file} vx-common.h vxworksae.h rs6000/vxworks.h rs6000/vxworksmils.h"
@@ -4776,14 +4925,12 @@ case "${target}" in
                         echo "#undef  LINK_OS_EXTRA_SPEC32"
                         echo "#define LINK_OS_EXTRA_SPEC32" \
                              "\"%(link_os_new_dtags)" \
-                             "-rpath $prefix/lib -rpath $at/lib" \
-                             "-L $prefix/lib -L $at/lib\""
+                             "-rpath $prefix/lib -rpath $at/lib\""
                         echo
                         echo "#undef  LINK_OS_EXTRA_SPEC64"
                         echo "#define LINK_OS_EXTRA_SPEC64" \
                              "\"%(link_os_new_dtags)" \
-                             "-rpath $prefix/lib64 -rpath $at/lib64" \
-                             "-L $prefix/lib64 -L $at/lib64\""
+                             "-rpath $prefix/lib64 -rpath $at/lib64\""
                         echo
                         echo "#undef  LINK_OS_NEW_DTAGS_SPEC"
                         echo "#define LINK_OS_NEW_DTAGS_SPEC" \
@@ -4796,7 +4943,10 @@ case "${target}" in
                         echo "#define MD_EXEC_PREFIX \"$at/bin/\""
                         echo
                         echo "#undef  MD_STARTFILE_PREFIX"
-                        echo "#define MD_STARTFILE_PREFIX \"$at/lib/\"") \
+                        echo "#define MD_STARTFILE_PREFIX \"$prefix/lib/\""
+                        echo
+                        echo "#undef  MD_STARTFILE_PREFIX_1"
+                        echo "#define MD_STARTFILE_PREFIX_1 \"$at/lib/\"") \
                            > advance-toolchain.h
                    else
                        echo "Unknown advance-toolchain $with_advance_toolchain"
@@ -4819,7 +4969,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 | 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 )
                                # OK
                                ;;
                        *)