]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
nios2-linux: add missing cpp specs
authorMike Frysinger <vapier@gentoo.org>
Thu, 28 May 2015 14:07:23 +0000 (14:07 +0000)
committerMike Frysinger <vapier@gcc.gnu.org>
Thu, 28 May 2015 14:07:23 +0000 (14:07 +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: r223828

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

index 39c5eb54ded890c8efd02e867ea7db9d1832d8e7..a80cc2be4b94a654d5827a560aaae6a80675b8b9 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 3e77ca6c90fe83191c91f73503df70aeb228c1e6..1b3fd992bdf81e100828df97bb4c699a09a38102 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