[PATCH] nios2-linux: add missing cpp specs

Mike Frysinger vapier@gentoo.org
Wed May 27 16:05:00 GMT 2015


Define CPP_SPEC for nios2 linux targets so that -posix & -pthread work
like on all other linux targets.

2015-05-27  Mike Frysinger  <vapier@gentoo.org>

	* config/nios2/linux.h (CPP_SPEC): Define.
---
 gcc/config/nios2/linux.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/gcc/config/nios2/linux.h b/gcc/config/nios2/linux.h
index 41cad94..f43f655 100644
--- a/gcc/config/nios2/linux.h
+++ b/gcc/config/nios2/linux.h
@@ -26,6 +26,9 @@
     }                                           \
   while (0)
 
+#undef CPP_SPEC
+#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
+
 #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-nios2.so.1"
 
 #undef LINK_SPEC
-- 
2.4.1



More information about the Gcc-patches mailing list