Patchwork [v3] PR 53270 fix hppa-linux bootstrap regression

login
register
mail settings
Submitter Jonathan Wakely
Date June 19, 2012, 7:42 a.m.
Message ID <CAH6eHdRmWhDw8NF1qsmSr9XhUzGbUh5L1eovx=ryvhBPvsyprg@mail.gmail.com>
Download mbox | patch
Permalink /patch/165691/
State New
Headers show

Comments

Jonathan Wakely - June 19, 2012, 7:42 a.m.
On 14 June 2012 23:23, Jonathan Wakely wrote:
>
> For 4.6.4 and 4.7.2 I plan to make a less intrusive change, #undef'ing
> the __GTHREAD_MUTEX_INIT, _GTHREAD_RECURSIVE_MUTEX_INIT and
> __GTHREAD_COND_INIT macros on hppa-linux in C++11 mode, so that the
> init functions are used instead.  This fixes the bootstrap regression
> on hppa-linux without affecting other targets.

Here's the simpler patch I'm committing to the 4.7 and 4.6 branches.

        PR libstdc++/53270
        * config/os/gnu-linux/os_defines.h: Disable static initializer macros
        for gthreads types in C++11 mode.

Tested hppa-linux.
commit 82976f5a0e4a69d247bded9d8bae99a633360f20
Author: Jonathan Wakely <jwakely.gcc@gmail.com>
Date:   Tue Jun 19 01:07:54 2012 +0100

    	PR libstdc++/53270
    	* config/os/gnu-linux/os_defines.h: Disable static initializer macros
    	for gthreads types in C++11 mode.

Patch

diff --git a/libstdc++-v3/config/os/gnu-linux/os_defines.h b/libstdc++-v3/config/os/gnu-linux/os_defines.h
index c4aa305..f41160f 100644
--- a/libstdc++-v3/config/os/gnu-linux/os_defines.h
+++ b/libstdc++-v3/config/os/gnu-linux/os_defines.h
@@ -46,4 +46,10 @@ 
 # undef _GLIBCXX_HAVE_GETS
 #endif
 
+#if defined(__hppa__) && defined(__GXX_EXPERIMENTAL_CXX0X__)
+# define _GTHREAD_USE_MUTEX_INIT_FUNC
+# define _GTHREAD_USE_RECURSIVE_MUTEX_INIT_FUNC
+# define _GTHREAD_USE_COND_INIT_FUNC
+#endif
+
 #endif