diff options
author | Claudiu Zissulescu <claziss@synopsys.com> | 2017-03-28 10:56:44 +0200 |
---|---|---|
committer | Claudiu Zissulescu <claziss@gcc.gnu.org> | 2017-03-28 10:56:44 +0200 |
commit | 0dee55fec92e299eb584f2d8e4bfb797e0c2328c (patch) | |
tree | 338a990483999f993f6b1d918dc249eae9fc9a0b /gcc/config/arc/arc.h | |
parent | d1ab0a32adf366f2254e05235efbf88b20a0e3a1 (diff) | |
download | gcc-0dee55fec92e299eb584f2d8e4bfb797e0c2328c.zip gcc-0dee55fec92e299eb584f2d8e4bfb797e0c2328c.tar.gz gcc-0dee55fec92e299eb584f2d8e4bfb797e0c2328c.tar.bz2 |
[ARC] Define _REENTRANT when -pthread is passed.
The compiler is supposed to have the builtin defined _REENTRANT defined
when -pthread is passed, which wasn't done on the ARC architecture.
When _REENTRANT is not passed, the C library will not use reentrant
functions, and the latest version of ax_pthread.m4 from the
autoconf-archive will no longer detect that thread support is
available (see https://savannah.gnu.org/patch/?8186).
gcc/
2017-03-28 Claudiu Zissulescu <claziss@synopsys.com>
Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* config/arc/arc.h (CPP_SPEC): Add subtarget_cpp_spec.
(EXTRA_SPECS): Define.
(SUBTARGET_EXTRA_SPECS): Likewise.
(SUBTARGET_CPP_SPEC): Likewise.
* config/arc/elf.h (EXTRA_SPECS): Renamed to
SUBTARGET_EXTRA_SPECS.
* config/arc/linux.h (SUBTARGET_CPP_SPEC): Define.
Co-Authored-By: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
From-SVN: r246524
Diffstat (limited to 'gcc/config/arc/arc.h')
-rw-r--r-- | gcc/config/arc/arc.h | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/gcc/config/arc/arc.h b/gcc/config/arc/arc.h index da19128..08644eb 100644 --- a/gcc/config/arc/arc.h +++ b/gcc/config/arc/arc.h @@ -61,7 +61,8 @@ along with GCC; see the file COPYING3. If not see %{mmac-d16:-D__Xxmac_d16} %{mmac-24:-D__Xxmac_24} \ %{mdsp-packa:-D__Xdsp_packa} %{mcrc:-D__Xcrc} %{mdvbf:-D__Xdvbf} \ %{mtelephony:-D__Xtelephony} %{mxy:-D__Xxy} %{mmul64: -D__Xmult32} \ -%{mlock:-D__Xlock} %{mswape:-D__Xswape} %{mrtsc:-D__Xrtsc}" +%{mlock:-D__Xlock} %{mswape:-D__Xswape} %{mrtsc:-D__Xrtsc} \ +%(subtarget_cpp_spec)" #undef CC1_SPEC #define CC1_SPEC "\ @@ -73,6 +74,27 @@ extern const char *arc_cpu_to_as (int argc, const char **argv); #define EXTRA_SPEC_FUNCTIONS \ { "cpu_to_as", arc_cpu_to_as }, +/* This macro defines names of additional specifications to put in the specs + that can be used in various specifications like CC1_SPEC. Its definition + is an initializer with a subgrouping for each command option. + + Each subgrouping contains a string constant, that defines the + specification name, and a string constant that used by the GCC driver + program. + + Do not define this macro if it does not need to do anything. */ +#define EXTRA_SPECS \ + { "subtarget_cpp_spec", SUBTARGET_CPP_SPEC }, \ + SUBTARGET_EXTRA_SPECS + +#ifndef SUBTARGET_EXTRA_SPECS +#define SUBTARGET_EXTRA_SPECS +#endif + +#ifndef SUBTARGET_CPP_SPEC +#define SUBTARGET_CPP_SPEC "" +#endif + #undef ASM_SPEC #define ASM_SPEC "%{mbig-endian|EB:-EB} %{EL} " \ "%:cpu_to_as(%{mcpu=*:%*}) %{mspfp*} %{mdpfp*} %{mfpu=fpuda*:-mfpuda}" |