On Wed, Jun 02, 2010 at 05:43:30PM -0700, William G. Scott wrote:
> 
> On Jun 2, 2010, at 5:37 PM, Jack Howarth wrote:
> 
> > Bill,
> >   What happens if you change...
> > 
> > make -j $num_cpu
> > 
> > ...to...
> > 
> > nice -n -20 make -j $num_cpu
> 
> Previous re-build is still re-building...
> 

Bill,
   According to...

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43170#c68

the attached changes should be sufficient to eliminate
the configure failures in the tls detection. Can you
try the stock gcc45-4.5.0-1000 packaging with the
attached patch appended to gcc45.patch on a problem
machine?
               Jack

ps If that is insufficient to fix the build, try appending
the second patch instead, tls_configure.patch2, which resorts to
making the symbols volatile as well.
--- 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);
--- gcc-4.5.0/libjava/configure.orig    2010-06-03 13:50:53.000000000 -0400
+++ gcc-4.5.0/libjava/configure 2010-06-03 13:51:44.000000000 -0400
@@ -24341,7 +24341,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)
                {
@@ -24353,11 +24354,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);
--- gcc-4.5.0/libstdc++-v3/configure.orig       2010-06-03 13:48:33.000000000 
-0400
+++ gcc-4.5.0/libstdc++-v3/configure    2010-06-03 13:55:44.000000000 -0400
@@ -25572,7 +25572,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)
                {
@@ -25584,11 +25585,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);
@@ -44510,7 +44510,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)
                {
@@ -44522,11 +44523,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);
@@ -50595,7 +50595,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)
                {
@@ -50607,11 +50608,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);
--- 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;
+               volatile int *a_in_other_thread;
+               volatile 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);
--- gcc-4.5.0/libjava/configure.orig    2010-06-03 13:50:53.000000000 -0400
+++ gcc-4.5.0/libjava/configure 2010-06-03 13:51:44.000000000 -0400
@@ -24341,7 +24341,8 @@
 /* end confdefs.h.  */
 #include <pthread.h>
                __thread int a;
-               static int *a_in_other_thread;
+               volatile int *a_in_other_thread;
+               volatile int *a_in_main_thread;
                static void *
                thread_func (void *arg)
                {
@@ -24353,11 +24354,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);
--- gcc-4.5.0/libstdc++-v3/configure.orig       2010-06-03 13:48:33.000000000 
-0400
+++ gcc-4.5.0/libstdc++-v3/configure    2010-06-03 13:55:44.000000000 -0400
@@ -25572,7 +25572,8 @@
 /* end confdefs.h.  */
 #include <pthread.h>
                __thread int a;
-               static int *a_in_other_thread;
+               volatile int *a_in_other_thread;
+               volatile int *a_in_main_thread;
                static void *
                thread_func (void *arg)
                {
@@ -25584,11 +25585,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);
@@ -44510,7 +44510,8 @@
 /* end confdefs.h.  */
 #include <pthread.h>
                __thread int a;
-               static int *a_in_other_thread;
+               volatile int *a_in_other_thread;
+               volatile int *a_in_main_thread;
                static void *
                thread_func (void *arg)
                {
@@ -44522,11 +44523,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);
@@ -50595,7 +50595,8 @@
 /* end confdefs.h.  */
 #include <pthread.h>
                __thread int a;
-               static int *a_in_other_thread;
+               volatile int *a_in_other_thread;
+               volatile int *a_in_main_thread;
                static void *
                thread_func (void *arg)
                {
@@ -50607,11 +50608,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);
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Fink-devel mailing list
[email protected]
http://news.gmane.org/gmane.os.apple.fink.devel
Subscription management:
https://lists.sourceforge.net/lists/listinfo/fink-devel

Reply via email to