nios2-linux: add missing cpp specs
authorMike Frysinger <vapier@gentoo.org>
Thu, 28 May 2015 13:59:58 +0000 (13:59 +0000)
committerMike Frysinger <vapier@gcc.gnu.org>
Thu, 28 May 2015 13:59:58 +0000 (13:59 +0000)
Define CPP_SPEC for nios2 linux targets so that -posix & -pthread work
like on all other linux targets.

Discovered via Gentoo bug https://bugs.gentoo.org/543114

From-SVN: r223823

gcc/ChangeLog
gcc/config/nios2/linux.h

index 8aae429ca4783dcb0561941defe300e4cf05ab4f..b66ba2fee625a4f8564c7c0bee4d8b46ebdd0b14 100644 (file)
@@ -1,3 +1,7 @@
+2015-05-28  Mike Frysinger  <vapier@gentoo.org>
+
+       * config/nios2/linux.h (CPP_SPEC): Define.
+
 2015-05-28  Mike Frysinger  <vapier@gentoo.org>
 
        * config/microblaze/linux.h (CPP_SPEC): Define.
index 41cad943c2ca410283e954ecaaa162927913117b..f43f655e8606afe6d4fdec8f1bdbff0bce4f0331 100644 (file)
@@ -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