This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: glibc test tst-thread_local1.cc fails to compile with latest GCC
- From: Steve Ellcey <sellcey at caviumnetworks dot com>
- To: Jonathan Wakely <jwakely dot gcc at gmail dot com>, "Ellcey, Steve" <Steve dot Ellcey at cavium dot com>
- Cc: "libc-alpha at sourceware dot org" <libc-alpha at sourceware dot org>, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Fri, 21 Oct 2016 09:07:32 -0700
- Subject: Re: glibc test tst-thread_local1.cc fails to compile with latest GCC
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=Steve dot Ellcey at cavium dot com;
- References: <SN2PR0701MB1071127508DE3F0D1174CF3AF5D20@SN2PR0701MB1071.namprd07.prod.outlook.com> <CAH6eHdR_gbfkJjLoEkDzbNSAVPA5tnfSni=+tMCeeD6sjtdG-g@mail.gmail.com>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
On Fri, 2016-10-21 at 17:03 +0100, Jonathan Wakely wrote:
>
> > Is there some C++ standard change that I am not aware of or some
> > other header file I need to include?
> No, what probably happened is GCC didn't detect a usable Pthreads
> implementation and so doesn't define std::thread. The <thread> header
> uses this condition around the definition of std::thread:
>
> #if defined(_GLIBCXX_HAS_GTHREADS) &&
> defined(_GLIBCXX_USE_C99_STDINT_TR1)
Yes, I finally realized I had built a GCC with '--enable-threads=no'
and was using that GCC to build GLIBC. Once I rebuilt GCC with threads
I could build GLIBC and not get this error.
Steve Ellcey