This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug bootstrap/43170] gcc 4.5 20100218 bootstrap compare fails on os x 10.6
- From: "howarth at nitro dot med dot uc dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Jun 2010 18:20:22 -0000
- Subject: [Bug bootstrap/43170] gcc 4.5 20100218 bootstrap compare fails on os x 10.6
- References: <bug-43170-14181@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #69 from howarth at nitro dot med dot uc dot edu 2010-06-03 18:20 -------
So the tls tests in the generated configure should be changed as follows?
--- gcc-4.5.0/libgomp/configure.orig 2010-06-03 13:05:23.000000000 -0400
+++ gcc-4.5.0/libgomp/configure 2010-06-03 13:41:14.000000000 -0400
@@ -15379,7 +15379,8 @@
/* end confdefs.h. */
#include <pthread.h>
__thread int a;
- static int *a_in_other_thread;
+ int *a_in_other_thread;
+ int *a_in_main_thread;
static void *
thread_func (void *arg)
{
@@ -15391,11 +15392,10 @@
{
pthread_t thread;
void *thread_retval;
- int *a_in_main_thread;
+ a_in_main_thread = &a;
if (pthread_create (&thread, (pthread_attr_t *)0,
thread_func, (void *)0))
return 0;
- a_in_main_thread = &a;
if (pthread_join (thread, &thread_retval))
return 0;
return (a_in_other_thread == a_in_main_thread);
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43170