public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] add common CPP_SPECS for bfin
@ 2016-11-29  5:56 Waldemar Brodkorb
  2016-11-29 21:41 ` Jeff Law
  0 siblings, 1 reply; 2+ messages in thread
From: Waldemar Brodkorb @ 2016-11-29  5:56 UTC (permalink / raw)
  To: gcc-patches

Hi,

add common defines _REENTRANT and _POSIX_SOURCE for bfin.
Patch is used in Buildroot for a while to fix issues compiling 
some software.
See here, why this should be always enabled:
https://lists.gnu.org/archive/html/autoconf-archive-maintainers/2016-06/msg00001.html  

2016-11-29  Waldemar Brodkorb <wbx@openadk.org>                                                                                                                         
                                                                                                                                                                        
       gcc/
       * gcc/config/bfin/linux.h: add common CPP_SPEC.

diff --git a/gcc/config/bfin/linux.h b/gcc/config/bfin/linux.h
index c02ff44..0922493 100644
--- a/gcc/config/bfin/linux.h
+++ b/gcc/config/bfin/linux.h
@@ -38,6 +38,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
   "%{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} \

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] add common CPP_SPECS for bfin
  2016-11-29  5:56 [PATCH] add common CPP_SPECS for bfin Waldemar Brodkorb
@ 2016-11-29 21:41 ` Jeff Law
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Law @ 2016-11-29 21:41 UTC (permalink / raw)
  To: Waldemar Brodkorb, gcc-patches

On 11/28/2016 10:51 PM, Waldemar Brodkorb wrote:
> Hi,
>
> add common defines _REENTRANT and _POSIX_SOURCE for bfin.
> Patch is used in Buildroot for a while to fix issues compiling
> some software.
> See here, why this should be always enabled:
> https://lists.gnu.org/archive/html/autoconf-archive-maintainers/2016-06/msg00001.html
>
> 2016-11-29  Waldemar Brodkorb <wbx@openadk.org>
>
>        gcc/
>        * gcc/config/bfin/linux.h: add common CPP_SPEC.
Thanks.  I've adjusted the ChangeLog entry and committed this patch for you.

Jeff

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-11-29 21:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-29  5:56 [PATCH] add common CPP_SPECS for bfin Waldemar Brodkorb
2016-11-29 21:41 ` Jeff Law

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