From 9bc5ecf3bcb25abbf868d52e7db076248e0ef174 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Tue, 13 Feb 2018 11:21:01 +0000 Subject: [PATCH] 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 --- gcc/ChangeLog | 4 ++++ gcc/config/riscv/linux.h | 2 ++ 2 files changed, 6 insertions(+) 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} \ -- 2.30.2