public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-6996] gcc: define _REENTRANT for OpenRISC when -pthread is passed
@ 2022-02-02 11:03 Stafford Horne
  0 siblings, 0 replies; only message in thread
From: Stafford Horne @ 2022-02-02 11:03 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:cac2f69cdad434ad5cb60f5fe931d45cd82ef476

commit r12-6996-gcac2f69cdad434ad5cb60f5fe931d45cd82ef476
Author: Bernd Kuhls <bernd.kuhls@t-online.de>
Date:   Fri Mar 27 21:23:53 2020 +0100

    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>

Diff:
---
 gcc/config/or1k/linux.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gcc/config/or1k/linux.h b/gcc/config/or1k/linux.h
index 52909af41a6..80f77c72232 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}				\


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

only message in thread, other threads:[~2022-02-02 11:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-02 11:03 [gcc r12-6996] gcc: define _REENTRANT for OpenRISC when -pthread is passed Stafford Horne

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).