This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] add common CPP_SPECS for bfin
- From: Waldemar Brodkorb <wbx at openadk dot org>
- To: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 29 Nov 2016 06:51:20 +0100
- Subject: [PATCH] add common CPP_SPECS for bfin
- Authentication-results: sourceware.org; auth=none
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} \