Tigthen the addition of -lgcc_eh to vxworks_libgcc_spec
commit46325c16324b06fa1b3ea7f8cb05f2109ed66cf6
authorOlivier Hainque <hainque@adacore.com>
Fri, 18 Feb 2022 22:44:53 +0000 (18 22:44 +0000)
committerOlivier Hainque <hainque@adacore.com>
Tue, 11 Oct 2022 07:28:15 +0000 (11 07:28 +0000)
treedca09252b17eb4b1bdc0c1b55a7fbef4b764a751
parent70d81e3a782ca8451c1c6b2c57ed154d20906aa3
Tigthen the addition of -lgcc_eh to vxworks_libgcc_spec

This change refines VXWORKS_LIBGCC_SPEC wrt the inclusion
of -lgcc_eh.

Unless the compiler features support for dual sjlj and
table based eh, libgcc_eh.a is available only with multilib
variants for which we build a shared lib (mrtp on VxWorks).

Rework logic to handle absence of libgcc_s
for -mrtp -mcmodel=large, using a conditional expr kind of
spec.

The gthread support in libgcc_eh might resort to libgcc
functions on some targets, e.g. cas synchronisation routines
on aarch64. Arrange to append -lgcc also after -lgcc_eh
in VXWORKS_LIBGCC_SPEC.

2022-10-09  Olivier Hainque  <hainque@adacore.com>

gcc/
* config/vxworks.h (VX_LGCC_EH_SO0, VX_LGCC_EH_SO1): New
internal macros.
(VXWORKS_LIBGCC_SPEC): Use them and document.
gcc/config/vxworks.h