Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Waldemar Brodkorb <wbx@openadk.org>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] gcc: enable _REENTRANT for bfin when -lpthread is used
Date: Sat, 1 Oct 2016 11:59:47 +0200	[thread overview]
Message-ID: <20161001095947.GA26848@waldemar-brodkorb.de> (raw)

See here, why this should be always enabled:
https://lists.gnu.org/archive/html/autoconf-archive-maintainers/2016-06/msg00001.html

Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
---
This might be a good addition to the patch series for gcc bfin,
which Thomas Petazzoni is handling :)
---
 package/gcc/6.2.0/895-bfin-define-REENTRANT.patch | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 package/gcc/6.2.0/895-bfin-define-REENTRANT.patch

diff --git a/package/gcc/6.2.0/895-bfin-define-REENTRANT.patch b/package/gcc/6.2.0/895-bfin-define-REENTRANT.patch
new file mode 100644
index 0000000..e2828a5
--- /dev/null
+++ b/package/gcc/6.2.0/895-bfin-define-REENTRANT.patch
@@ -0,0 +1,17 @@
+enable _REENTRANT when -lpthread is used
+
+Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
+
+diff -Nur gcc-6.2.0.orig/gcc/config/bfin/linux.h gcc-6.2.0/gcc/config/bfin/linux.h
+--- gcc-6.2.0.orig/gcc/config/bfin/linux.h	2016-01-04 15:30:50.000000000 +0100
++++ gcc-6.2.0/gcc/config/bfin/linux.h	2016-09-30 20:48:17.446636819 +0200
+@@ -38,6 +38,9 @@
+   "%{static:--start-group} %{mfast-fp:-lbffastfp} %G %L %{static:--end-group} \
+    %{!static:%{mfast-fp:-lbffastfp} %G}"
+ 
++#undef CPP_SPEC
++#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
++
+ #undef LINK_SPEC
+ #define LINK_SPEC "\
+   %{mfdpic: -m elf32bfinfd -z text} %{shared} %{pie} \
-- 
2.1.4

             reply	other threads:[~2016-10-01  9:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-01  9:59 Waldemar Brodkorb [this message]
2016-10-02 19:47 ` [Buildroot] [PATCH] gcc: enable _REENTRANT for bfin when -lpthread is used Peter Korsgaard

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=20161001095947.GA26848@waldemar-brodkorb.de \
    --to=wbx@openadk.org \
    --cc=buildroot@busybox.net \
    /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