Provide vxworks alternate stdint.h during the build
authorOlivier Hainque <hainque@adacore.com>
Sun, 28 Nov 2021 15:21:25 +0000 (15:21 +0000)
committerOlivier Hainque <hainque@adacore.com>
Thu, 9 Dec 2021 15:54:50 +0000 (15:54 +0000)
commit6a0f6018ba41658b9b85ad82ed1bd748754f3eca
treeac4da9a412e75486d639e0155637acbed645fb45
parent0d5db1dd65b45286082f82f600ca0a3e6e43e06e
Provide vxworks alternate stdint.h during the build

This change arranges to provide the vxworks alternate stdint.h
at build time instead of at install time, so it is used instead
of the system one while building the libraries.

This is a lot more consistent and helps the build on configurations
where the system does not come with stdint.h at all.

The change uses a similar mechanism as the one previsouly introduced
for glimits.h and takes the opportunity to simplify the glimits.h
command to use an automatic variable.

This introduces an indirect dependency on the VxWorks version.h
for vxcrtstuff objects, for which we then need to apply the same
tricks as for libgcc2 regarding include paths (to select the system
header instead of the gcc one).

2021-02-12  Olivier Hainque  <hainque@adacore.com>
    Rasmus Villemoes  <rv@rasmusvillemoes.dk>

gcc/
* Makefile.in (T_STDINT_GCC_H): New variable, path to
stdint-gcc.h that a target configuration may override when
use_gcc_stdint is "provide".
(stmp-int-hdrs): Depend on it and copy that for
USE_GCC_INT=provide.
* config.gcc (vxworks): Revert to use_gcc_stdint=provide.
* config/t-vxworks (T_STDINT_GCC_H): Define, as vxw-stdint-gcc.h.
(vxw-stdint-gcc.h): New target, produced from the original
stdint-gcc.h.
(vxw-glimits.h): Use an automatic variable to designate the
first and only prerequisite.
* config/vxworks/stdint.h: Remove.

libgcc/
* config/t-vxworks: Set CRTSTUFF_T_CFLAGS to
$(LIBGCC2_INCLUDES).
* config/t-vxworks7: Likewise.
gcc/Makefile.in
gcc/config.gcc
gcc/config/t-vxworks
gcc/config/vxworks/stdint.h [deleted file]
libgcc/config/t-vxworks
libgcc/config/t-vxworks7