mirror of git://gcc.gnu.org/git/gcc.git
Ensure use of gcc's version of stdatomic.h in gthr-vxworks
VxWorks provides its own version of the standard stdatomic.h, possibly relying on non-gcc builtins, and our implementation of the gthr API resorts to VxWorks specific functions for atomicity features. When compiling libgcc (with gcc), make sure gcc's version of stdatomic.h is used: #include it here, first, then define the macro used to guard the system version so it doesn't get expanded when included indirectly by other system headers. 2025-10-20 Olivier Hainque <hainque@adacore.com> Ashley Gay <gay@adacore.com> libgcc/ * config/gthr-vxworks.h: Include stdatomic.h and prevent indirect inclusion of contents from the system version of that header.
This commit is contained in:
parent
4514439dac
commit
ce46ebb26b
|
|
@ -34,6 +34,19 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
/* VxWorks provides its own version of the standard stdatomic.h, possibly
|
||||||
|
relying on non-gcc builtins, and our implementation of the gthr API resorts
|
||||||
|
to VxWorks specific functions for atomicity features.
|
||||||
|
|
||||||
|
When compiling libgcc (with gcc), make sure gcc's version of stdatomic.h
|
||||||
|
is used: #include it here, first, then define the macro used to guard the
|
||||||
|
system version so it doesn't get expanded when included indirectly by
|
||||||
|
other system headers. */
|
||||||
|
#if defined(IN_LIBGCC2)
|
||||||
|
#include <../include/stdatomic.h>
|
||||||
|
#define __INCstdatomich
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <vxWorks.h>
|
#include <vxWorks.h>
|
||||||
#include <_vxworks-versions.h>
|
#include <_vxworks-versions.h>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue