diff options
author | Bernd Kuhls <bernd.kuhls@t-online.de> | 2020-03-27 21:23:53 +0100 |
---|---|---|
committer | Stafford Horne <shorne@gmail.com> | 2022-02-02 20:02:59 +0900 |
commit | cac2f69cdad434ad5cb60f5fe931d45cd82ef476 (patch) | |
tree | 293e1591c216ab62e008e6dbc1871d7e35951e7f /gcc/config/or1k | |
parent | 9f6f411f63f3aceddd846e4b0d27202a6e13d42c (diff) | |
download | gcc-cac2f69cdad434ad5cb60f5fe931d45cd82ef476.zip gcc-cac2f69cdad434ad5cb60f5fe931d45cd82ef476.tar.gz gcc-cac2f69cdad434ad5cb60f5fe931d45cd82ef476.tar.bz2 |
gcc: define _REENTRANT for OpenRISC when -pthread is passed
The detection of pthread support fails on OpenRISC unless _REENTRANT
is defined. Added the CPP_SPEC definition to correct this.
gcc/ChangeLog:
PR target/94372
* config/or1k/linux.h (CPP_SPEC): Define.
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Diffstat (limited to 'gcc/config/or1k')
-rw-r--r-- | gcc/config/or1k/linux.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/config/or1k/linux.h b/gcc/config/or1k/linux.h index 52909af..80f77c7 100644 --- a/gcc/config/or1k/linux.h +++ b/gcc/config/or1k/linux.h @@ -32,6 +32,8 @@ #undef MUSL_DYNAMIC_LINKER #define MUSL_DYNAMIC_LINKER "/lib/ld-musl-or1k.so.1" +#define CPP_SPEC "%{pthread:-D_REENTRANT}" + #undef LINK_SPEC #define LINK_SPEC "%{h*} \ %{static:-Bstatic} \ |