Re: [PATCH] PR libstdc++/67843 set shared_ptr lock policy at build-time

2018-11-30 Thread Ramana Radhakrishnan
Firstly thanks a lot for working on this. On 28/11/2018 12:49, Jonathan Wakely wrote: > On 28/11/18 12:30 +, Jonathan Wakely wrote: >> 3) We could change libstdc++'s configure to automatically override >> --with-libstdcxx-lock-policy for arm-linux so it always uses "atomic" >> (because we kn

Re: [PATCH] PR libstdc++/67843 set shared_ptr lock policy at build-time

2018-11-29 Thread Christophe Lyon
On 28/11/2018 12:35, Jonathan Wakely wrote: On 28/11/18 10:54 +0100, Christophe Lyon wrote: On Wed, 28 Nov 2018 at 00:25, Jonathan Wakely wrote: This resolves a longstanding issue where the lock policy for shared_ptr reference counting depends on compilation options when the header is include

Re: [PATCH] PR libstdc++/67843 set shared_ptr lock policy at build-time

2018-11-29 Thread Richard Biener
On Wed, Nov 28, 2018 at 3:09 PM Jonathan Wakely wrote: > > On 28/11/18 14:46 +0100, Richard Biener wrote: > >On Wed, Nov 28, 2018 at 1:30 PM Jonathan Wakely wrote: > >> > >> On 28/11/18 11:11 +, Jonathan Wakely wrote: > >> >On 28/11/18 11:46 +0100, Richard Biener wrote: > >> >>On Wed, Nov 28,

Re: [PATCH] PR libstdc++/67843 set shared_ptr lock policy at build-time

2018-11-28 Thread Hans-Peter Nilsson
> Date: Tue, 27 Nov 2018 23:25:55 + > From: Jonathan Wakely > This resolves a longstanding issue where the lock policy for shared_ptr > reference counting depends on compilation options when the header is > included, so that different -march options can cause ABI > changes. > [...] Thank you

Re: [PATCH] PR libstdc++/67843 set shared_ptr lock policy at build-time

2018-11-28 Thread Jonathan Wakely
On 28/11/18 14:46 +0100, Richard Biener wrote: On Wed, Nov 28, 2018 at 1:30 PM Jonathan Wakely wrote: On 28/11/18 11:11 +, Jonathan Wakely wrote: >On 28/11/18 11:46 +0100, Richard Biener wrote: >>On Wed, Nov 28, 2018 at 12:26 AM Jonathan Wakely wrote: >>> >>>This resolves a longstanding i

Re: [PATCH] PR libstdc++/67843 set shared_ptr lock policy at build-time

2018-11-28 Thread Richard Biener
On Wed, Nov 28, 2018 at 1:30 PM Jonathan Wakely wrote: > > On 28/11/18 11:11 +, Jonathan Wakely wrote: > >On 28/11/18 11:46 +0100, Richard Biener wrote: > >>On Wed, Nov 28, 2018 at 12:26 AM Jonathan Wakely wrote: > >>> > >>>This resolves a longstanding issue where the lock policy for shared_p

Re: [PATCH] PR libstdc++/67843 set shared_ptr lock policy at build-time

2018-11-28 Thread Jonathan Wakely
On 28/11/18 12:30 +, Jonathan Wakely wrote: 3) We could change libstdc++'s configure to automatically override --with-libstdcxx-lock-policy for arm-linux so it always uses "atomic" (because we know the kernel helpers are available). That causes an ABI change for a GCC built for --target=armv5

Re: [PATCH] PR libstdc++/67843 set shared_ptr lock policy at build-time

2018-11-28 Thread Jonathan Wakely
On 28/11/18 11:35 +, Jonathan Wakely wrote: On 28/11/18 10:54 +0100, Christophe Lyon wrote: The reason I'm still using cortex-a9 at QEMU level is that many tests override -mcpu/-march, and I used that as a compromise. That means you're not fully testing armv5t, because you're still linking

Re: [PATCH] PR libstdc++/67843 set shared_ptr lock policy at build-time

2018-11-28 Thread Jonathan Wakely
On 28/11/18 11:11 +, Jonathan Wakely wrote: On 28/11/18 11:46 +0100, Richard Biener wrote: On Wed, Nov 28, 2018 at 12:26 AM Jonathan Wakely wrote: This resolves a longstanding issue where the lock policy for shared_ptr reference counting depends on compilation options when the header is i

Re: [PATCH] PR libstdc++/67843 set shared_ptr lock policy at build-time

2018-11-28 Thread Jonathan Wakely
On 28/11/18 10:54 +0100, Christophe Lyon wrote: On Wed, 28 Nov 2018 at 00:25, Jonathan Wakely wrote: This resolves a longstanding issue where the lock policy for shared_ptr reference counting depends on compilation options when the header is included, so that different -march options can cause

Re: [PATCH] PR libstdc++/67843 set shared_ptr lock policy at build-time

2018-11-28 Thread Jonathan Wakely
On 28/11/18 11:46 +0100, Richard Biener wrote: On Wed, Nov 28, 2018 at 12:26 AM Jonathan Wakely wrote: This resolves a longstanding issue where the lock policy for shared_ptr reference counting depends on compilation options when the header is included, so that different -march options can cau

Re: [PATCH] PR libstdc++/67843 set shared_ptr lock policy at build-time

2018-11-28 Thread Richard Biener
On Wed, Nov 28, 2018 at 12:26 AM Jonathan Wakely wrote: > > This resolves a longstanding issue where the lock policy for shared_ptr > reference counting depends on compilation options when the header is > included, so that different -march options can cause ABI changes. For > example, objects comp

Re: [PATCH] PR libstdc++/67843 set shared_ptr lock policy at build-time

2018-11-28 Thread Christophe Lyon
On Wed, 28 Nov 2018 at 00:25, Jonathan Wakely wrote: > > This resolves a longstanding issue where the lock policy for shared_ptr > reference counting depends on compilation options when the header is > included, so that different -march options can cause ABI changes. For > example, objects compile

[PATCH] PR libstdc++/67843 set shared_ptr lock policy at build-time

2018-11-27 Thread Jonathan Wakely
This resolves a longstanding issue where the lock policy for shared_ptr reference counting depends on compilation options when the header is included, so that different -march options can cause ABI changes. For example, objects compiled with -march=armv7 will use atomics to synchronize reference c