From: Andreas Schwab Date: Tue, 13 Feb 2018 11:21:01 +0000 (+0000) Subject: RISC-V: define _REENTRANT with -pthread X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9bc5ecf3bcb25abbf868d52e7db076248e0ef174;p=gcc.git RISC-V: define _REENTRANT with -pthread This is expected by the AX_PTHREAD autoconf macro from . * config/riscv/linux.h (CPP_SPEC): Define. From-SVN: r257621 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6ed2b5ca39e..1bb2af7f240 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2018-02-13 Andreas Schwab + + * config/riscv/linux.h (CPP_SPEC): Define. + 2018-02-13 Jakub Jelinek PR target/84335 diff --git a/gcc/config/riscv/linux.h b/gcc/config/riscv/linux.h index 1da1b0a74ea..ad03654e8d6 100644 --- a/gcc/config/riscv/linux.h +++ b/gcc/config/riscv/linux.h @@ -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} \