public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-5577] Add TARGET_HAVE_LIBATOMIC
@ 2023-11-18 11:45 Sebastian Huber
  0 siblings, 0 replies; only message in thread
From: Sebastian Huber @ 2023-11-18 11:45 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:3ef8882adcb1ab5fa535e9e1a2a28ea7c8eeca4f

commit r14-5577-g3ef8882adcb1ab5fa535e9e1a2a28ea7c8eeca4f
Author: Sebastian Huber <sebastian.huber@embedded-brains.de>
Date:   Tue Nov 14 21:27:37 2023 +0100

    Add TARGET_HAVE_LIBATOMIC
    
    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.

Diff:
---
 gcc/config/rtems.h | 2 ++
 gcc/doc/tm.texi    | 5 +++++
 gcc/doc/tm.texi.in | 2 ++
 gcc/target.def     | 8 ++++++++
 4 files changed, 17 insertions(+)

diff --git a/gcc/config/rtems.h b/gcc/config/rtems.h
index 8641ea15271..2c006e4c1e5 100644
--- a/gcc/config/rtems.h
+++ b/gcc/config/rtems.h
@@ -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)
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
index 56d64a04640..dcf77359e66 100644
--- a/gcc/doc/tm.texi
+++ b/gcc/doc/tm.texi
@@ -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
diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in
index fb0120fa1bf..b61a59fdaf3 100644
--- a/gcc/doc/tm.texi.in
+++ b/gcc/doc/tm.texi.in
@@ -8041,3 +8041,5 @@ maintainer is familiar with.
 @hook TARGET_MEMTAG_UNTAGGED_POINTER
 
 @hook TARGET_HAVE_SHADOW_CALL_STACK
+
+@hook TARGET_HAVE_LIBATOMIC
diff --git a/gcc/target.def b/gcc/target.def
index db87e7d39df..475c55c22c1 100644
--- a/gcc/target.def
+++ b/gcc/target.def
@@ -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)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-11-18 11:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-18 11:45 [gcc r14-5577] Add TARGET_HAVE_LIBATOMIC Sebastian Huber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).