aboutsummaryrefslogtreecommitdiff
path: root/libgcc
diff options
context:
space:
mode:
authorOlivier Hainque <hainque@adacore.com>2020-01-05 12:45:54 +0000
committerOlivier Hainque <hainque@gcc.gnu.org>2020-01-05 12:45:54 +0000
commit5205a4456b555b5b123ee3ec759e5c74dbd01057 (patch)
treebb215d99f84cd13fcab6012d93ec4db2d3724b65 /libgcc
parent72036b59a0143c61acd2652a832e3903e180d0f9 (diff)
downloadgcc-5205a4456b555b5b123ee3ec759e5c74dbd01057.zip
gcc-5205a4456b555b5b123ee3ec759e5c74dbd01057.tar.gz
gcc-5205a4456b555b5b123ee3ec759e5c74dbd01057.tar.bz2
Guard inclusion of vxAtomicLib.h from gthr-vxworks.h
2020-01-05 Olivier Hainque <hainque@adacore.com> * config/gthr-vxworks.h: Guard #include vxAtomicLib.h by IN_LIBGCC2. From-SVN: r279885
Diffstat (limited to 'libgcc')
-rw-r--r--libgcc/ChangeLog5
-rw-r--r--libgcc/config/gthr-vxworks.h7
2 files changed, 12 insertions, 0 deletions
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog
index e2e67ab..ae2099d 100644
--- a/libgcc/ChangeLog
+++ b/libgcc/ChangeLog
@@ -1,3 +1,8 @@
+2020-01-05 Olivier Hainque <hainque@adacore.com>
+
+ * config/gthr-vxworks.h: Guard #include vxAtomicLib.h
+ by IN_LIBGCC2.
+
2020-01-01 Jakub Jelinek <jakub@redhat.com>
Update copyright years.
diff --git a/libgcc/config/gthr-vxworks.h b/libgcc/config/gthr-vxworks.h
index 4b2cd76..8b55fc5 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 <vxAtomicLib.h>
+#endif
#endif