RISC-V: define _REENTRANT with -pthread
authorAndreas Schwab <schwab@suse.de>
Tue, 13 Feb 2018 11:21:01 +0000 (11:21 +0000)
committerAndreas Schwab <schwab@gcc.gnu.org>
Tue, 13 Feb 2018 11:21:01 +0000 (11:21 +0000)
This is expected by the AX_PTHREAD autoconf macro from
<http://www.gnu.org/software/autoconf-archive/ax_pthread.html>.

* config/riscv/linux.h (CPP_SPEC): Define.

From-SVN: r257621

gcc/ChangeLog
gcc/config/riscv/linux.h

index 6ed2b5ca39e5c949773e53423a84274d87580e11..1bb2af7f24093fb907308f8837dc9d4fffa6de73 100644 (file)
@@ -1,3 +1,7 @@
+2018-02-13  Andreas Schwab  <schwab@suse.de>
+
+       * config/riscv/linux.h (CPP_SPEC): Define.
+
 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
 
        PR target/84335
index 1da1b0a74ea46b914429a333d40d2fb8496d29cd..ad03654e8d6f295dc5af13dedcda686cb09af6b4 100644 (file)
@@ -47,6 +47,8 @@ along with GCC; see the file COPYING3.  If not see
 
 #define ICACHE_FLUSH_FUNC "__riscv_flush_icache"
 
+#define CPP_SPEC "%{pthread:-D_REENTRANT}"
+
 #define LINK_SPEC "\
 -melf" XLEN_SPEC "lriscv \
 %{shared} \