diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2023-11-14 21:27:37 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2023-11-18 12:44:14 +0100 |
commit | 3ef8882adcb1ab5fa535e9e1a2a28ea7c8eeca4f (patch) | |
tree | f3950d51f0f7933731f6a567c5d6ef4d84b9e6a4 | |
parent | 23d33775f9225e6e8efac730fe3cf286c19fddea (diff) | |
download | gcc-3ef8882adcb1ab5fa535e9e1a2a28ea7c8eeca4f.zip gcc-3ef8882adcb1ab5fa535e9e1a2a28ea7c8eeca4f.tar.gz gcc-3ef8882adcb1ab5fa535e9e1a2a28ea7c8eeca4f.tar.bz2 |
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.
-rw-r--r-- | gcc/config/rtems.h | 2 | ||||
-rw-r--r-- | gcc/doc/tm.texi | 5 | ||||
-rw-r--r-- | gcc/doc/tm.texi.in | 2 | ||||
-rw-r--r-- | gcc/target.def | 8 |
4 files changed, 17 insertions, 0 deletions
diff --git a/gcc/config/rtems.h b/gcc/config/rtems.h index 8641ea1..2c006e4 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 56d64a0..dcf7735 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 fb0120f..b61a59f 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 db87e7d..475c55c 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) |