public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Stafford Horne <shorne@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r12-6996] gcc: define _REENTRANT for OpenRISC when -pthread is passed
Date: Wed,  2 Feb 2022 11:03:21 +0000 (GMT)	[thread overview]
Message-ID: <20220202110321.E35423858C2C@sourceware.org> (raw)

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}				\


                 reply	other threads:[~2022-02-02 11:03 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220202110321.E35423858C2C@sourceware.org \
    --to=shorne@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).