Re: [PATCH] Use hardware_concurrency only if _GLIBCXX_HAS_GTHREADS

2021-04-22 Thread Martin Liška
On 4/21/21 10:16 PM, Jakub Jelinek wrote: > On Wed, Apr 21, 2021 at 08:53:54PM +0100, Jonathan Wakely wrote: What would be IMHO a good idea would be to use configure test for #include int t = std::thread::hardware_concurrency (); and in that case use that as a fallback to the

Re: [PATCH] Use hardware_concurrency only if _GLIBCXX_HAS_GTHREADS

2021-04-22 Thread Martin Liška
On 4/21/21 9:53 PM, Jonathan Wakely wrote: > On Wed, 21 Apr 2021 at 20:41, Martin Liška wrote: >> >> On 4/21/21 9:15 PM, Jakub Jelinek wrote: >>> On Wed, Apr 21, 2021 at 08:28:55PM +0200, Jakub Jelinek via Gcc-patches >>> wrote: > There's a patch attempt for the problem with >

Re: [PATCH] Use hardware_concurrency only if _GLIBCXX_HAS_GTHREADS

2021-04-21 Thread Jakub Jelinek via Gcc-patches
On Wed, Apr 21, 2021 at 08:53:54PM +0100, Jonathan Wakely wrote: > > > What would be IMHO a good idea would be to use configure test for > > > #include > > > int t = std::thread::hardware_concurrency (); > > > and in that case use that as a fallback to the previous implementation, > > > that will

Re: [PATCH] Use hardware_concurrency only if _GLIBCXX_HAS_GTHREADS

2021-04-21 Thread Tom Tromey
> "Jakub" == Jakub Jelinek via Gcc-patches writes: Jakub> What would be IMHO a good idea would be to use configure test for Jakub> #include Jakub> int t = std::thread::hardware_concurrency (); Jakub> and in that case use that as a fallback to the previous implementation, Jakub> that will be

Re: [PATCH] Use hardware_concurrency only if _GLIBCXX_HAS_GTHREADS

2021-04-21 Thread Jonathan Wakely via Gcc-patches
On Wed, 21 Apr 2021 at 20:41, Martin Liška wrote: > > On 4/21/21 9:15 PM, Jakub Jelinek wrote: > > On Wed, Apr 21, 2021 at 08:28:55PM +0200, Jakub Jelinek via Gcc-patches > > wrote: > >>> There's a patch attempt for the problem with > >>> std::thread::hardware_concurrency where > >>> it's used

Re: [PATCH] Use hardware_concurrency only if _GLIBCXX_HAS_GTHREADS

2021-04-21 Thread Martin Liška
On 4/21/21 9:15 PM, Jakub Jelinek wrote: > On Wed, Apr 21, 2021 at 08:28:55PM +0200, Jakub Jelinek via Gcc-patches wrote: >>> There's a patch attempt for the problem with >>> std::thread::hardware_concurrency where >>> it's used only if _GLIBCXX_HAS_GTHREADS is set. >>> >>> Does it help? >>>

Re: [PATCH] Use hardware_concurrency only if _GLIBCXX_HAS_GTHREADS

2021-04-21 Thread Jakub Jelinek via Gcc-patches
On Wed, Apr 21, 2021 at 03:25:26PM -0400, David Edelsohn wrote: > > What would be IMHO a good idea would be to use configure test for > > #include > > int t = std::thread::hardware_concurrency (); > > and in that case use that as a fallback to the previous implementation, > > that will be

Re: [PATCH] Use hardware_concurrency only if _GLIBCXX_HAS_GTHREADS

2021-04-21 Thread David Edelsohn via Gcc-patches
On Wed, Apr 21, 2021 at 3:16 PM Jakub Jelinek wrote: > > On Wed, Apr 21, 2021 at 08:28:55PM +0200, Jakub Jelinek via Gcc-patches wrote: > > > There's a patch attempt for the problem with > > > std::thread::hardware_concurrency where > > > it's used only if _GLIBCXX_HAS_GTHREADS is set. > > > > >

Re: [PATCH] Use hardware_concurrency only if _GLIBCXX_HAS_GTHREADS

2021-04-21 Thread Jakub Jelinek via Gcc-patches
On Wed, Apr 21, 2021 at 08:28:55PM +0200, Jakub Jelinek via Gcc-patches wrote: > > There's a patch attempt for the problem with > > std::thread::hardware_concurrency where > > it's used only if _GLIBCXX_HAS_GTHREADS is set. > > > > Does it help? > > Thanks, > > Martin > > > > gcc/ChangeLog: > >

Re: [PATCH] Use hardware_concurrency only if _GLIBCXX_HAS_GTHREADS

2021-04-21 Thread Jakub Jelinek via Gcc-patches
On Wed, Apr 21, 2021 at 08:28:56PM +0200, Jakub Jelinek wrote: > On Wed, Apr 21, 2021 at 08:04:18PM +0200, Martin Liška wrote: > > Hello. > > > > There's a patch attempt for the problem with > > std::thread::hardware_concurrency where > > it's used only if _GLIBCXX_HAS_GTHREADS is set. > > > >

Re: [PATCH] Use hardware_concurrency only if _GLIBCXX_HAS_GTHREADS

2021-04-21 Thread Jakub Jelinek via Gcc-patches
On Wed, Apr 21, 2021 at 08:04:18PM +0200, Martin Liška wrote: > Hello. > > There's a patch attempt for the problem with > std::thread::hardware_concurrency where > it's used only if _GLIBCXX_HAS_GTHREADS is set. > > Does it help? > Thanks, > Martin > > gcc/ChangeLog: > > PR

[PATCH] Use hardware_concurrency only if _GLIBCXX_HAS_GTHREADS

2021-04-21 Thread Martin Liška
Hello. There's a patch attempt for the problem with std::thread::hardware_concurrency where it's used only if _GLIBCXX_HAS_GTHREADS is set. Does it help? Thanks, Martin gcc/ChangeLog: PR bootstrap/100186 * lto-wrapper.c: Use hardware_concurrency only if