]> git.ipfire.org Git - thirdparty/gcc.git/commit
Define GCC_DRIVER_HOST_INITIALIZATION for VxWorks targets
authorMarc Poulhiès <poulhies@adacore.com>
Tue, 4 Jan 2022 14:56:27 +0000 (14:56 +0000)
committerOlivier Hainque <hainque@adacore.com>
Sun, 2 Oct 2022 09:25:39 +0000 (09:25 +0000)
commit2f26f5b584856927337728ddc598c44f1426fa32
tree1b706f0eb77919e7b38f409f57b097a0dd00542e
parent372044a67ec8346f4f308c5fe79d9e1cb6e7e6c6
Define GCC_DRIVER_HOST_INITIALIZATION for VxWorks targets

We need to perform static links by default on VxWorks, where the use
of shared libraries involves unusual steps compared to standard native
systems.

This has to be conveyed before the lang_specific_driver code gets
invoked (in particular for g++), so specs aren't available.

This change defines the GCC_DRIVER_HOST_INITIALIZATION macro for
VxWorks, to insert a -static option in case the user hasn't provided any
explicit indication on the command line of the kind of link desired.

While a HOST macro doesn't seem appropriate to control a target OS
driven behavior, this matches other uses and won't conflict as VxWorks
is not supported on any of the other configurations using this macro.

gcc/
* config/vxworks-driver.cc: New.
* config.gcc (*vxworks*): Add vxworks-driver.o in extra_gcc_objs.
* config/t-vxworks: Add vxworks-driver.o.
* config/vxworks.h (GCC_DRIVER_HOST_INITIALIZATION): New.
gcc/config.gcc
gcc/config/t-vxworks
gcc/config/vxworks-driver.cc [new file with mode: 0644]
gcc/config/vxworks.h