[patch] vxworks: Introduce support for vxworks7r2 on x86 and x86_64

Olivier Hainque hainque@adacore.com
Thu Oct 29 13:35:44 GMT 2020


Hello,

This change extends the VxWorks support on intel CPUs to
VxWorks7r2, with a "mcmodel=large" additional multilib for
the 64bit configuration.
    
The support for fPIC is not functional yet for this model,
so we just don't add the corresponding multilib.

Following the trend already visible on powerpc, the base system
environment is getting extremely close to the standard Linux one,
so fPIC and usual kernel vs RTP distinction apart, the new port 
essentially just leverages the base ELF definitions.
    
We extend the range of CPU families handled by TARGET_OS_CPP_BUILTINS,
accounting for the fact that archs older than PENTIUM4 are
not supported (any more) by VxWorks 7. As we did for powerpc, we
leverage VX_CPU_PREFIX to emit different forms of definitions for
different families of VxWorks as the system headers's expectations
has evolved between Vx 5, 6 and 7.

Wiith libquadmath disabled (compile time confusion from an
imprecise definition of “howmany” in some variants of the system
headers), we get decent gcc/g++/libstdc++ testsuite results with
this change on a gcc-9 source base, for both 32 and 64bit environments,
for both kernel and RTP modes.

I was able to get good gcc and g++ results for RTPs with this change
applied on a gcc-10 source base and sanity checked that a build with
mainline sources proceeds to completion.

Olivier
    
2020-10-27  Olivier Hainque  <hainque@adacore.com>
    
gcc/
        * config.gcc: Adjust the ix86/x86_64-wrs-vxworks filters
        to apply to VxWorks 7 as well.
        * config/i386/t-vxworks (MULTILIB_OPTIONS, MULTILIB_DIRNAMES):
        Remove the fPIC multilib and add one for the large code model
        on x86_64.
        * config/i386/vxworks.h: Separate sections for TARGET_VXWORKS7,
        other variants and common bits.
        (TARGET_OS_CPP_BUILTINS): Augment to support a range of CPU
        families. Leverage VX_CPU_PREFIX.
        (CC1_SPEC): Add definition.
        (STACK_CHECK_PROTECT): Use conditional expression instead of
        heavier to read conditioned macro definitions.
    
libgcc/
        config.host: Adjust the ix86/x86_64-wrs-vxworks filters
        to apply to VxWorks 7 as well.
    
Co-autored-by:  Douglas Rupp  <rupp@adacore.com>
Co-autored-by:  Pat Bernardi  <bernardi@adacore.com>

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0001-Introduce-support-for-vxworks7r2-on-x86-and-x86_64.txt
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20201029/f95969e9/attachment.txt>


More information about the Gcc-patches mailing list