aboutsummaryrefslogtreecommitdiff
path: root/gcc/config.gcc
diff options
context:
space:
mode:
authorDouglas Rupp <rupp@adacore.com>2020-02-18 09:54:58 +0000
committerOlivier Hainque <hainque@adacore.com>2020-10-21 16:26:37 +0000
commit178679809068c72f9f4c63e53afeab651f06b882 (patch)
treed0afd2c2a9383214fea0ffded5f6c80c8fd19589 /gcc/config.gcc
parentc8f795cac6a1325bc6bcba3f47b7d04cb790400c (diff)
downloadgcc-178679809068c72f9f4c63e53afeab651f06b882.zip
gcc-178679809068c72f9f4c63e53afeab651f06b882.tar.gz
gcc-178679809068c72f9f4c63e53afeab651f06b882.tar.bz2
Introduce vxworks7r2 support for ppc and ppc64
This change introduces support for the most recent versions of VxWorks on PowerPC targets, for both 32 and 64 bit thanks to a bi-arch setup. The system compilers are essentially configured as Linux toolchains with only a few specificities and we replicate that model here. The most visible specificities are the use of secureplt by default, the pre-definition of some macros that the system headers still rely on (_VX_CPU and _VX_CPU_FAMILY, for example), and of course some variations related to the so VxWorks typical kernel vs RTP mode distinction. In addition to the introduction of config.gcc and libgcc configuration chunks, much inspired by the linux ones, the change - Reworks rs6000/vxworks.h file to feature bits common to the Vx6 and Vx7 port then a separate section for each, where the Vx7 part is very short as we rely on the Linux definitions for most things. - Adjusts the CPU macro predefinitions in CPP_SPEC to resort to "_VX_CPU" instead of "CPU" for Vx7, to better match the more recent system headers expectations, - Adds a cpu definition case for e6500. - Changes to the use SUB3TARGET_OVERRIDE_OPTIONS instead of SUBSUBTARGET_OVERRIDE_OPTIONS for specifics, so we don't override the Linux's version of the latter for vx7. 2020-10-20 Douglas Rupp <rupp@adacore.com> gcc/ * config.gcc (powerpc*-wrs-vxworks7r*): New case. * config/rs6000/vxworks.h: Rework to handle VxWorks7. Refactor as common bits + vx6 vs vx7 ones. For the latter, rely essentially on the Linux configuration and adjust CPU to _VX_CPU in CPP_SPEC. Add a case for e6500. Use SUB3TARGET_OVERRIDE_OPTIONS for specifics to preserve the Linux SUBSUBTARGET_OVERRIDE_OPTIONS for vx7. libgcc/ * config.host (powerpc*-wrs-vxworks7*): New case. * configure.ac: Handle powerpc*-*-vxworks7* as powerpc*-*-linux* for ppc-fp_type. * configure: Regenerate. Co-authored-by: Olivier Hainque <hainque@adacore.com>
Diffstat (limited to 'gcc/config.gcc')
-rw-r--r--gcc/config.gcc21
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/config.gcc b/gcc/config.gcc
index b79c544..03d89d7 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -2976,6 +2976,27 @@ powerpc*-*-linux*)
tm_file="rs6000/secureplt.h ${tm_file}"
fi
;;
+powerpc*-wrs-vxworks7r*)
+
+ # Wind River 7 post SR0600 is mostly like Linux so we setup
+ # our config in a very similar fashion and adjust to a few
+ # specificities.
+
+ # The system compiler is configured with secureplt by default.
+ tm_file="${tm_file} rs6000/secureplt.h"
+
+ tm_file="${tm_file} elfos.h gnu-user.h linux.h freebsd-spec.h"
+ tm_file="${tm_file} rs6000/sysv4.h rs6000/biarch64.h rs6000/default64.h rs6000/linux64.h"
+ tm_file="${tm_file} vx-common.h vxworks.h rs6000/vxworks.h"
+
+ extra_options="${extra_options} rs6000/sysv4.opt linux.opt rs6000/linux64.opt"
+
+ tmake_file="${tmake_file} t-linux rs6000/t-linux64 rs6000/t-fprules rs6000/t-ppccomm"
+ tmake_file="${tmake_file} rs6000/t-vxworks"
+
+ tm_defines="$tm_defines DEFAULT_LIBC=LIBC_GLIBC"
+ extra_objs="$extra_objs linux.o rs6000-linux.o"
+ ;;
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"