board/csky: fixup gdb instructions in readme.txt
[buildroot-gz.git] / package / gcc / arc-2016.09-release / 895-arc-define-_REENTRANT-when-pthread-is-passed.patch
blobee9add53c40a6bcd1c562317c02c4111d2dcd9bc
1 From 4c6367c99461fdd7bd5613483f2582d7f08fba87 Mon Sep 17 00:00:00 2001
2 From: Vlad Zakharov <vzakhar@synopsys.com>
3 Date: Tue, 28 Feb 2017 17:41:11 +0300
4 Subject: [PATCH] arc: define _REENTRANT when -pthread is passed
6 The compiler is supposed to have the builtin defined _REENTRANT defined
7 when -pthread is passed, which wasn't done on the ARC architecture.
9 When _REENTRANT is not passed, the C library will not use reentrant
10 functions, and the latest version of ax_pthread.m4 from the
11 autoconf-archive will no longer detect that thread support is
12 available (see https://savannah.gnu.org/patch/?8186).
14 Signed-off-by: Vlad Zakharov <vzakhar@synopsys.com>
15 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
16 ---
17 gcc/config/arc/arc.h | 1 +
18 1 file changed, 1 insertion(+)
20 diff --git a/gcc/config/arc/arc.h b/gcc/config/arc/arc.h
21 index 611ef54..fdd4b5d 100644
22 --- a/gcc/config/arc/arc.h
23 +++ b/gcc/config/arc/arc.h
24 @@ -93,6 +93,7 @@ along with GCC; see the file COPYING3. If not see
25 %{mdsp-packa:-D__Xdsp_packa} %{mcrc:-D__Xcrc} %{mdvbf:-D__Xdvbf} \
26 %{mtelephony:-D__Xtelephony} %{mxy:-D__Xxy} %{mmul64: -D__Xmult32} \
27 %{mlock:-D__Xlock} %{mswape:-D__Xswape} %{mrtsc:-D__Xrtsc} \
28 +%{pthread:-D_REENTRANT} \
29 %{mcpu=nps400:-D__NPS400__}"
31 #define CC1_SPEC "\
33 2.7.4