diff options
author | Douglas Rupp <rupp@adacore.com> | 2020-02-18 09:54:58 +0000 |
---|---|---|
committer | Olivier Hainque <hainque@adacore.com> | 2020-10-21 16:26:37 +0000 |
commit | 178679809068c72f9f4c63e53afeab651f06b882 (patch) | |
tree | d0afd2c2a9383214fea0ffded5f6c80c8fd19589 /libgcc | |
parent | c8f795cac6a1325bc6bcba3f47b7d04cb790400c (diff) | |
download | gcc-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 'libgcc')
-rw-r--r-- | libgcc/config.host | 17 | ||||
-rwxr-xr-x | libgcc/configure | 4 | ||||
-rw-r--r-- | libgcc/configure.ac | 4 |
3 files changed, 21 insertions, 4 deletions
diff --git a/libgcc/config.host b/libgcc/config.host index dbb378f..fd8e55e 100644 --- a/libgcc/config.host +++ b/libgcc/config.host @@ -1226,6 +1226,23 @@ powerpc*-*-linux*) extra_parts="$extra_parts ecrti.o ecrtn.o ncrti.o ncrtn.o" md_unwind_header=rs6000/linux-unwind.h ;; +powerpc*-wrs-vxworks7*) + tmake_file="$tmake_file rs6000/t-ppccomm rs6000/t-savresfgpr rs6000/t-crtstuff rs6000/t-linux t-dfprules config/rs6000/t-ppc64-fp t-slibgcc-libgcc" + case $ppc_fp_type in + 64) + ;; + hard) + tmake_file="${tmake_file} t-hardfp-sfdf" + ;; + soft) + tmake_file="${tmake_file} t-softfp-sfdf t-softfp" + ;; + *) + echo "Unknown ppc_fp_type $ppc_fp_type" 1>&2 + exit 1 + ;; + esac + ;; powerpc-wrs-vxworks*) tmake_file="$tmake_file rs6000/t-ppccomm rs6000/t-savresfgpr t-fdpbit" extra_parts="$extra_parts crtbegin.o crtend.o" diff --git a/libgcc/configure b/libgcc/configure index 284e4db..78fc22a 100755 --- a/libgcc/configure +++ b/libgcc/configure @@ -5164,11 +5164,11 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibc_version_major.$glibc_version_minor" >&5 $as_echo "$glibc_version_major.$glibc_version_minor" >&6; } -# Determine floating-point type for powerpc*-*-linux*. +# Determine floating-point type for powerpc*-*-linux* or vxworks7*. # Single-precision-only FPRs are not a supported configuration for # this target, so are not allowed for in this test. case ${host} in -powerpc*-*-linux*) +powerpc*-*-linux* | powerpc*-*-vxworks7*) cat > conftest.c <<EOF #ifdef __powerpc64__ ppc_fp_type=64 diff --git a/libgcc/configure.ac b/libgcc/configure.ac index ef0d799..ed50c0e 100644 --- a/libgcc/configure.ac +++ b/libgcc/configure.ac @@ -383,11 +383,11 @@ AC_COMPUTE_INT([glibc_version_minor], [__GLIBC_MINOR__], [glibc_version_minor=0])]) AC_MSG_RESULT([$glibc_version_major.$glibc_version_minor]) -# Determine floating-point type for powerpc*-*-linux*. +# Determine floating-point type for powerpc*-*-linux* or vxworks7*. # Single-precision-only FPRs are not a supported configuration for # this target, so are not allowed for in this test. case ${host} in -powerpc*-*-linux*) +powerpc*-*-linux* | powerpc*-*-vxworks7*) cat > conftest.c <<EOF #ifdef __powerpc64__ ppc_fp_type=64 |