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 <w...@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} \

Reply via email to