diff options
author | Andrew Waterman <andrew@sifive.com> | 2024-06-21 16:34:25 -0700 |
---|---|---|
committer | Andrew Waterman <andrew@sifive.com> | 2024-06-21 16:34:25 -0700 |
commit | 29da1405c43ff6f2b6c4f7f8ea41ec59810a4e55 (patch) | |
tree | 59a29b7e08a962ef3e46df88d91e1dd743959486 | |
parent | 2d7af2fb56937171b9794205d854a85b0dd41bb4 (diff) | |
download | spike-29da1405c43ff6f2b6c4f7f8ea41ec59810a4e55.zip spike-29da1405c43ff6f2b6c4f7f8ea41ec59810a4e55.tar.gz spike-29da1405c43ff6f2b6c4f7f8ea41ec59810a4e55.tar.bz2 |
Fix C/C++ thread-local linkage differently
Just admit Mac OS is broken, so explicitly special-case it.
See #1689 and #1703
-rw-r--r-- | softfloat/softfloat.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/softfloat/softfloat.h b/softfloat/softfloat.h index 72daccb..8f533c8 100644 --- a/softfloat/softfloat.h +++ b/softfloat/softfloat.h @@ -50,8 +50,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include <stdint.h> #include "softfloat_types.h" -#if __has_include(<threads.h>) -# include <threads.h> +#if defined(__cplusplus) && !defined(__APPLE__) # define THREAD_LOCAL thread_local #else # define THREAD_LOCAL _Thread_local |