Patchwork [v3] libstdc++/50196 - enable std::thread, std::mutex etc. on darwin

login
register
mail settings
Submitter Jonathan Wakely
Date Oct. 22, 2011, 11:02 a.m.
Message ID <CAH6eHdTnViYwURfYm_RdKoFJ20LZh5saGL_=wOiBh=Groz8=Tg@mail.gmail.com>
Download mbox | patch
Permalink /patch/121180/
State New
Headers show

Comments

Jonathan Wakely - Oct. 22, 2011, 11:02 a.m.
Plus this bit, which I didn't include in my 'svn diff' command for the
last patches:

        * testsuite/30_threads/unique_lock/cons/5.cc: Likewise.
        * testsuite/30_threads/unique_lock/cons/6.cc: Likewise.
        * testsuite/30_threads/unique_lock/locking/3.cc: Likewise.
        * testsuite/30_threads/unique_lock/locking/4.cc: Likewise.

The patch has kindly been tested by Dominique Dhumieres on
x86_64-darwin and works as intended. There are a number of failures in
the 30_threads tests due to PR 50598, which didn't affect libstdc++
previously because the 30_threads tests were all disabled as
unsupported.
Jonathan Wakely - Oct. 22, 2011, 9:54 p.m.
I've committed this, if I've broken anything for non-POSIX platforms
there will be time to fix it before 4.7
IainS - Oct. 24, 2011, 7:27 a.m.
Hi Jonathan,

On 22 Oct 2011, at 22:54, Jonathan Wakely wrote:

> I've committed this, if I've broken anything for non-POSIX platforms
> there will be time to fix it before 4.7

At present, (180333-180339) these tests seem to be failing on *- 
darwin{9,10} (which are posix) - with the failure owing to a missing  
emulated TLS variable.

e.g:
   "___emutls_v._ZSt15__once_callable", referenced from:
       ___emutls_v._ZSt15__once_callable$non_lazy_ptr in ccV8obVS.o
ld: symbol(s) not found

I haven't tried on another emulated TLS platform, but usually they  
break together - any ideas, or should I just file a PR?
cheers
Iain
Jonathan Wakely - Oct. 24, 2011, 8:21 a.m.
On 24 October 2011 08:27, Iain Sandoe wrote:
> Hi Jonathan,
>
> On 22 Oct 2011, at 22:54, Jonathan Wakely wrote:
>
>> I've committed this, if I've broken anything for non-POSIX platforms
>> there will be time to fix it before 4.7
>
> At present, (180333-180339) these tests seem to be failing on *-darwin{9,10}
> (which are posix) - with the failure owing to a missing emulated TLS
> variable.
>
> e.g:
>  "___emutls_v._ZSt15__once_callable", referenced from:
>      ___emutls_v._ZSt15__once_callable$non_lazy_ptr in ccV8obVS.o
> ld: symbol(s) not found
>
> I haven't tried on another emulated TLS platform, but usually they break
> together - any ideas, or should I just file a PR?

That's PR 50598

Patch

Index: testsuite/30_threads/unique_lock/cons/5.cc
===================================================================
--- testsuite/30_threads/unique_lock/cons/5.cc	(revision 180278)
+++ testsuite/30_threads/unique_lock/cons/5.cc	(working copy)
@@ -3,9 +3,9 @@ 
 // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } }
 // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } }
 // { dg-require-cstdint "" }
-// { dg-require-gthreads "" }
+// { dg-require-gthreads-timed "" }
 
-// Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+// Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
Index: testsuite/30_threads/unique_lock/cons/6.cc
===================================================================
--- testsuite/30_threads/unique_lock/cons/6.cc	(revision 180278)
+++ testsuite/30_threads/unique_lock/cons/6.cc	(working copy)
@@ -3,9 +3,9 @@ 
 // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } }
 // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } }
 // { dg-require-cstdint "" }
-// { dg-require-gthreads "" }
+// { dg-require-gthreads-timed "" }
 
-// Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+// Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
Index: testsuite/30_threads/unique_lock/locking/3.cc
===================================================================
--- testsuite/30_threads/unique_lock/locking/3.cc	(revision 180278)
+++ testsuite/30_threads/unique_lock/locking/3.cc	(working copy)
@@ -3,9 +3,9 @@ 
 // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } }
 // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } }
 // { dg-require-cstdint "" }
-// { dg-require-gthreads "" }
+// { dg-require-gthreads-timed "" }
 
-// Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+// Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
Index: testsuite/30_threads/unique_lock/locking/4.cc
===================================================================
--- testsuite/30_threads/unique_lock/locking/4.cc	(revision 180278)
+++ testsuite/30_threads/unique_lock/locking/4.cc	(working copy)
@@ -3,9 +3,9 @@ 
 // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } }
 // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } }
 // { dg-require-cstdint "" }
-// { dg-require-gthreads "" }
+// { dg-require-gthreads-timed "" }
 
-// Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+// Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the