On Fri, 2006-10-06 at 10:18 -0400, Brian W. Barrett wrote: > Is there a platform on which this breaks? It seems to have worked well > for years... I'll take a closer look early next week.
It should be a general problem as far as i know. It might have "worked well for years" but it has never done the "right thing". The changes to ompi_config_pthreads.m4 is just to make sure LIBS have the correct value when the checks for OMPI_INTL_POSIX_THREADS_LIBS are finished and the PTHREAD_MUTEX_ERRORCHECK_NP test is started. Take a look at the code before applying patch and after and you'll see what i'm aiming for. The ompi_check_pthread_pids.m4 fixes two problems. Making sure that CFLAGS (and not only CPPFLAGS) contains -pthread when building with gcc (which it didn't and hence the test always failed on all gcc builds.) And fixing the test-code itself which was incorrect. It worked somewhat with old Linux-threads but the new posix correct thread implementation is more strict on what can be returned in pthread_exit. So the patches fixes things that was always broken...