]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Add TARGET_HAVE_LIBATOMIC
authorSebastian Huber <sebastian.huber@embedded-brains.de>
Tue, 14 Nov 2023 20:27:37 +0000 (21:27 +0100)
committerSebastian Huber <sebastian.huber@embedded-brains.de>
Sat, 18 Nov 2023 11:44:14 +0000 (12:44 +0100)
Add target data to indicate if libatomic is available.

gcc/ChangeLog:

* config/rtems.h (TARGET_HAVE_LIBATOMIC): Define.
* doc/tm.texi: Regenerate.
* doc/tm.texi.in (TARGET_HAVE_LIBATOMIC): Add.
* target.def (have_libatomic): New.

gcc/config/rtems.h
gcc/doc/tm.texi
gcc/doc/tm.texi.in
gcc/target.def

index 8641ea15271d78a752d8157a4b5c16c9b9250efc..2c006e4c1e544e6866b5a515e2fe96c5e489c758 100644 (file)
@@ -53,6 +53,8 @@
 
 #define TARGET_POSIX_IO
 
+#define TARGET_HAVE_LIBATOMIC true
+
 /* Prefer int for int32_t (see stdint-newlib.h).  */
 #undef STDINT_LONG32
 #define STDINT_LONG32 (INT_TYPE_SIZE != 32 && LONG_TYPE_SIZE == 32)
index 56d64a046400ee231457f31f5d16ae748dcc9d36..dcf77359e66f3c1bb7c1a88c15d52bdad20f4302 100644 (file)
@@ -12605,3 +12605,8 @@ The default clears the top byte of the original pointer.
 This value is true if the target platform supports
 @option{-fsanitize=shadow-call-stack}.  The default value is false.
 @end deftypevr
+
+@deftypevr {Target Hook} bool TARGET_HAVE_LIBATOMIC
+This value is true if the target platform supports
+libatomic.  The default value is false.
+@end deftypevr
index fb0120fa1bfdf9c48681188362405277523ef63e..b61a59fdaf3c05d72b92d7775acfe18344c6f15e 100644 (file)
@@ -8041,3 +8041,5 @@ maintainer is familiar with.
 @hook TARGET_MEMTAG_UNTAGGED_POINTER
 
 @hook TARGET_HAVE_SHADOW_CALL_STACK
+
+@hook TARGET_HAVE_LIBATOMIC
index db87e7d39df3fee74e47e31f48826a0fd1a83c66..475c55c22c1d855e209c087f23da7930f5c280d5 100644 (file)
@@ -7251,6 +7251,14 @@ DEFHOOKPOD
 @option{-fsanitize=shadow-call-stack}.  The default value is false.",
  bool, false)
 
+/* This value represents whether libatomic is available on
+   the target platform.  */
+DEFHOOKPOD
+(have_libatomic,
+ "This value is true if the target platform supports\n\
+libatomic.  The default value is false.",
+ bool, false)
+
 /* Close the 'struct gcc_target' definition.  */
 HOOK_VECTOR_END (C90_EMPTY_HACK)