1
1

* There are a couple of platforms that do dead code elimination on linking,

which was resulting in the pthreads functions never getting linked in.
  Which would cause false positives on the threading tests.  Make sure
  that there is a call chain from main() -> pthread_create(), which should
  be enough to make the test happy.

This commit was SVN r3998.
Этот коммит содержится в:
Brian Barrett 2005-01-14 16:08:30 +00:00
родитель 035b55bf81
Коммит 1fb96505a4

Просмотреть файл

@ -43,12 +43,26 @@ AC_DEFUN([OMPI_INTL_PTHREAD_TRY_LINK_F77], [
#
# Make sure that we can run a small application in Fortran, with
# pthreads living in a C object file
ompi_ac_thread_fn=
if test "x$ompi_ac_doubleunder" = xy || test "x$ompi_ac_singleunder" = xy; then
ompi_ac_thread_fn=pthreadtest_
else
if test "x$ompi_ac_nounder" = xy; then
ompi_ac_thread_fn=pthreadtest
else
if test "x$ompi_ac_caps" = xy; then
ompi_ac_thread_fn=PTHREADTEST
else
AC_MSG_WARN([*** FORTRAN external naming convention undefined])
AC_MSG_ERROR([*** Cannot continue.])
fi
fi
fi
# Fortran module
cat > conftestf.f <<EOF
program fpthread
INTEGER i
i = 1
call PTHREADTEST
end
EOF
@ -67,9 +81,10 @@ $ompi_conftest_h
#ifdef __cplusplus
extern "C" {
#endif
void ompi_pthread()
void $ompi_ac_thread_fn()
{
pthread_t th;
pthread_create(&th, NULL, NULL, NULL);
pthread_join(th, 0);
pthread_attr_init(0);
pthread_cleanup_push(0, 0);