Re: [PATCH] Use std::thread::hardware_concurrency in lto-wrapper.c.

2021-04-22 Thread Eric Botcazou
> Anyway, that's why we have a C++ ISO standard and so > std::thread::hardware_concurrency function implementation can (and likely > should) handle all this. Or? This is a compiler though, i.e. quite low level in the software stack, so the implementation must be conservative and thus fancy C++ fe

Re: [PATCH] Use std::thread::hardware_concurrency in lto-wrapper.c.

2021-04-22 Thread Eric Botcazou
> This patch broke bootstrap on AIX. > > std::thread is not provided in all instances. GCC is not compiled > multi-threaded by default. Right, this will very likely break on Windows too. -- Eric Botcazou

Re: [PATCH] Use std::thread::hardware_concurrency in lto-wrapper.c.

2021-04-21 Thread Martin Liška
On 4/21/21 8:27 PM, Jakub Jelinek wrote: > On Wed, Apr 21, 2021 at 08:06:26PM +0200, Martin Liška wrote: >> On 4/21/21 7:56 PM, Jakub Jelinek wrote: >>> On Wed, Apr 21, 2021 at 11:50:02AM -0400, David Edelsohn via Gcc-patches >>> wrote: This patch broke bootstrap on AIX. std::thread

Re: [PATCH] Use std::thread::hardware_concurrency in lto-wrapper.c.

2021-04-21 Thread Jakub Jelinek via Gcc-patches
On Wed, Apr 21, 2021 at 08:06:26PM +0200, Martin Liška wrote: > On 4/21/21 7:56 PM, Jakub Jelinek wrote: > > On Wed, Apr 21, 2021 at 11:50:02AM -0400, David Edelsohn via Gcc-patches > > wrote: > >> This patch broke bootstrap on AIX. > >> > >> std::thread is not provided in all instances. GCC is n

Re: [PATCH] Use std::thread::hardware_concurrency in lto-wrapper.c.

2021-04-21 Thread Martin Liška
On 4/21/21 7:56 PM, Jakub Jelinek wrote: > On Wed, Apr 21, 2021 at 11:50:02AM -0400, David Edelsohn via Gcc-patches > wrote: >> This patch broke bootstrap on AIX. >> >> std::thread is not provided in all instances. GCC is not compiled >> multi-threaded by default. >> >> error: `std::thread' has n

Re: [PATCH] Use std::thread::hardware_concurrency in lto-wrapper.c.

2021-04-21 Thread Jakub Jelinek via Gcc-patches
On Wed, Apr 21, 2021 at 11:50:02AM -0400, David Edelsohn via Gcc-patches wrote: > This patch broke bootstrap on AIX. > > std::thread is not provided in all instances. GCC is not compiled > multi-threaded by default. > > error: `std::thread' has not been declared. In addition to that, I'm not re

Re: [PATCH] Use std::thread::hardware_concurrency in lto-wrapper.c.

2021-04-21 Thread David Edelsohn via Gcc-patches
This patch broke bootstrap on AIX. std::thread is not provided in all instances. GCC is not compiled multi-threaded by default. error: `std::thread' has not been declared. Thanks, David

Re: [PATCH] Use std::thread::hardware_concurrency in lto-wrapper.c.

2021-04-21 Thread Jeff Law via Gcc-patches
On 4/21/2021 2:08 AM, Martin Liška wrote: Having c++11, we can now use a handy function called std::thread::hardware_concurrency. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? Thanks, Martin gcc/ChangeLog: * lto-wrapper.c (cpuset_popc

[PATCH] Use std::thread::hardware_concurrency in lto-wrapper.c.

2021-04-21 Thread Martin Liška
Having c++11, we can now use a handy function called std::thread::hardware_concurrency. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? Thanks, Martin gcc/ChangeLog: * lto-wrapper.c (cpuset_popcount): Remove. (init_num_threads): Rem