aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2015-05-28 14:07:23 +0000
committerMike Frysinger <vapier@gentoo.org>2015-05-28 14:07:23 +0000
commit200456ddab23b6b4be56c96da0cb42dae3a951db (patch)
treedd4b5c70520fe601b3c57ac1e9d22d96fbbd1dc1
parentf622da5fe860eea6585b04ae380e08ba4cd9e64e (diff)
nios2-linux: add missing cpp specs
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 git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@223828 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/config/nios2/linux.h3
2 files changed, 7 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 39c5eb54ded..a80cc2be4b9 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,9 @@
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.
2015-05-28 Mike Frysinger <vapier@gentoo.org>
diff --git a/gcc/config/nios2/linux.h b/gcc/config/nios2/linux.h
index 3e77ca6c90f..1b3fd992bdf 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