diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index e2e67ab9c3f..ae2099d4e5b 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,8 @@ +2020-01-05 Olivier Hainque + + * config/gthr-vxworks.h: Guard #include vxAtomicLib.h + by IN_LIBGCC2. + 2020-01-01 Jakub Jelinek Update copyright years. diff --git a/libgcc/config/gthr-vxworks.h b/libgcc/config/gthr-vxworks.h index 4b2cd769cac..8b55fc55407 100644 --- a/libgcc/config/gthr-vxworks.h +++ b/libgcc/config/gthr-vxworks.h @@ -70,7 +70,14 @@ typedef volatile unsigned char __vx_tas_t; #define __TAS(x) vxAtomicCas ((x), 0, 1) typedef atomic_t __vx_tas_t; +/* Our implementation will need the system headers to use the vxAtomic + primitives. Other includers won't and could actually be incompatible + with this inclusion, for instance libstdc++ sources compiled in C++ + 98 mode while AtomicLib for C++ requires C++ 11 at least. */ + +#if defined(IN_LIBGCC2) #include +#endif #endif