1
1

Fix some fortran flags variable names, and fortran configury C test

problems (i.e., don't return a value from a void() function!).  Thanks
to Eugene for identifying these issues.  Hopefully this will fix up
the problems Oracle is having with compiling the new Fortran stuff.

This commit was SVN r26310.
Этот коммит содержится в:
Jeff Squyres 2012-04-23 15:28:26 +00:00
родитель a0c3e38ded
Коммит f9c685bd5e
4 изменённых файлов: 35 добавлений и 34 удалений

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

@ -87,16 +87,16 @@ void pthreadtest_f(void)
}
void pthreadtest(void)
{ return pthreadtest_f(); }
{ pthreadtest_f(); }
void pthreadtest_(void)
{ return pthreadtest_f(); }
{ pthreadtest_f(); }
void pthreadtest__(void)
{ return pthreadtest_f(); }
{ pthreadtest_f(); }
void PTHREADTEST(void)
{ return pthreadtest_f(); }
{ pthreadtest_f(); }
#ifdef __cplusplus
}
@ -359,18 +359,18 @@ AC_DEFUN([OMPI_INTL_POSIX_THREADS_SPECIAL_FLAGS_FC], [
if test "$ompi_pthread_fortran_success" = "0" -a "$OMPI_WANT_FORTRAN_BINDINGS" = "1"; then
for pf in $pflags; do
AC_MSG_CHECKING([if Fortran compiler and POSIX threads work with $pf])
FFLAGS="$orig_FFLAGS $pf"
FCFLAGS="$orig_FCFLAGS $pf"
AC_LANG_PUSH(C)
OMPI_INTL_PTHREAD_TRY_LINK_FORTRAN(ompi_pthread_fortran_success=1,
ompi_pthread_fortran_success=0)
AC_LANG_POP(C)
if test "$ompi_pthread_fortran_success" = "1"; then
PTHREAD_FFLAGS="$pf"
PTHREAD_FCFLAGS="$pf"
AC_MSG_RESULT([yes])
break
else
PTHREAD_FFLAGS=
FFLAGS="$orig_FFLAGS"
PTHREAD_FCFLAGS=
FCFLAGS="$orig_FCFLAGS"
AC_MSG_RESULT([no])
fi
done
@ -621,7 +621,7 @@ ompi_pthread_fortran_success=0
ompi_pthread_cxx_success=0
orig_CFLAGS="$CFLAGS"
orig_FFLAGS="$FFLAGS"
orig_FCFLAGS="$FCFLAGS"
orig_CXXFLAGS="$CXXFLAGS"
orig_CPPFLAGS="$CPPFLAGS"
orig_CXXCPPFLAGS="$CXXCPPFLAGS"
@ -629,7 +629,7 @@ orig_LDFLAGS="$LDFLAGS"
orig_LIBS="$LIBS"
PTHREAD_CFLAGS=
PTHREAD_FFLAGS=
PTHREAD_FCFLAGS=
PTHREAD_CXXFLAGS=
PTHREAD_CPPFLAGS=
PTHREAD_CXXCPPFLAGS=
@ -673,7 +673,7 @@ AC_DEFINE_UNQUOTED([OMPI_HAVE_PTHREAD_MUTEX_ERRORCHECK], [$defval],
[If PTHREADS implementation supports PTHREAD_MUTEX_ERRORCHECK])
CFLAGS="$orig_CFLAGS"
FFLAGS="$orig_FFLAGS"
FCFLAGS="$orig_FCFLAGS"
CXXFLAGS="$orig_CXXFLAGS"
CPPFLAGS="$orig_CPPFLAGS"
CXXCPPFLAGS="$orig_CXXCPPFLAGS"

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

@ -9,6 +9,7 @@ dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
dnl University of Stuttgart. All rights reserved.
dnl Copyright (c) 2004-2005 The Regents of the University of California.
dnl All rights reserved.
dnl Copyright (c) 2012 Cisco Systems, Inc. All rights reserved.
dnl $COPYRIGHT$
dnl
dnl Additional copyrights may follow
@ -38,8 +39,8 @@ AC_DEFUN([OMPI_INTL_SOLARIS_TRY_LINK], [
])dnl
AC_DEFUN([OMPI_INTL_SOLARIS_TRY_LINK_F77], [
# BEGIN: OMPI_INTL_SOLARIS_TRY_LINK_F77
AC_DEFUN([OMPI_INTL_SOLARIS_TRY_LINK_FC], [
# BEGIN: OMPI_INTL_SOLARIS_TRY_LINK_FC
#
# Make sure that we can run a small application in Fortran, with
# pthreads living in a C object file
@ -82,7 +83,7 @@ EOF
OPAL_LOG_COMMAND(
[$CC $CFLAGS -I. -c conftest.c],
OPAL_LOG_COMMAND(
[$F77 $FFLAGS conftestf.f conftest.o -o conftest $LDFLAGS $LIBS],
[$FC $FCFLAGS conftestf.f conftest.o -o conftest $LDFLAGS $LIBS],
[HAPPY=1],
[HAPPY=0]),
[HAPPY=0])
@ -103,7 +104,7 @@ fi
unset HAPPY ompi_conftest_h
rm -rf conftest*
# END: OMPI_INTL_SOLARIS_TRY_LINK_F77
# END: OMPI_INTL_SOLARIS_TRY_LINK_FC
])dnl
@ -163,42 +164,42 @@ fi
AC_DEFUN([OMPI_CONFIG_SOLARIS_THREADS_FC], [
if test "$OMPI_WANT_F77_BINDINGS" = "1"; then
if test "$OMPI_WANT_FC_BINDINGS" = "1"; then
if test "$BASEFC" = "f77"; then
STHREAD_FFLAGS="-mt"
STHREAD_FCFLAGS="-mt"
style="Workshop/Forte"
else
STHREAD_LIBS="-lthread"
style="-lthread"
fi
FFLAGS="$STHREAD_FFLAGS $FFLAGS_orig"
FCFLAGS="$STHREAD_FCFLAGS $FCFLAGS_orig"
CFLAGS="$STHREAD_CFLAGS $CFLAGS_orig"
CPPFLAGS="$STHREAD_CPPFLAGS $CPPFLAGS_orig"
LDFLAGS="$STHREAD_LDFLAGS $LDFLAGS_orig"
LIBS="$STHREAD_LIBS $LIBS_orig"
AC_MSG_CHECKING([if F77 compiler and Solaris threads work])
AC_MSG_CHECKING([if FC compiler and Solaris threads work])
AC_LANG_PUSH(C)
OMPI_INTL_SOLARIS_TRY_LINK_F77(ompi_sthread_f77_success=1,
ompi_sthread_f77_success=0)
OMPI_INTL_SOLARIS_TRY_LINK_FC(ompi_sthread_fc_success=1,
ompi_sthread_fc_success=0)
AC_LANG_POP(C)
if test "$ompi_sthread_f77_success" = "1"; then
if test "$ompi_sthread_fc_success" = "1"; then
AC_MSG_RESULT([yes - $style])
else
AC_MSG_RESULT([no])
fi
else
ompi_sthread_f77_success=1
ompi_sthread_fc_success=1
fi
])dnl
AC_DEFUN([OMPI_CONFIG_SOLARIS_THREADS],[
ompi_sthread_c_success=0
ompi_sthread_f77_success=0
ompi_sthread_fc_success=0
ompi_sthread_cxx_success=0
orig_CFLAGS="$CFLAGS"
orig_FFLAGS="$FFLAGS"
orig_FCFLAGS="$FCFLAGS"
orig_CXXFLAGS="$CXXFLAGS"
orig_CPPFLAGS="$CPPFLAGS"
orig_CXXCPPFLAGS="$CXXCPPFLAGS"
@ -206,7 +207,7 @@ orig_LDFLAGS="$LDFLAGS"
orig_LIBS="$LIBS"
STHREAD_CFLAGS=
STHREAD_FFLAGS=
STHREAD_FCFLAGS=
STHREAD_CXXFLAGS=
STHREAD_CPPFLAGS=
STHREAD_CXXCPPFLAGS=
@ -222,12 +223,12 @@ AC_PROVIDE_IFELSE([AC_PROG_CXX],
[OMPI_CONFIG_SOLARIS_THREADS_CXX],
[ompi_sthread_cxx_success=1])
AC_PROVIDE_IFELSE([AC_PROG_F77],
AC_PROVIDE_IFELSE([AC_PROG_FC],
[OMPI_CONFIG_SOLARIS_THREADS_FC],
[ompi_sthread_f77_success=1])
[ompi_sthread_fc_success=1])
CFLAGS="$orig_CFLAGS"
FFLAGS="$orig_FFLAGS"
FCFLAGS="$orig_FCFLAGS"
CXXFLAGS="$orig_CXXFLAGS"
CPPFLAGS="$orig_CPPFLAGS"
CXXCPPFLAGS="$orig_CXXCPPFLAGS"
@ -236,7 +237,7 @@ LIBS="$orig_LIBS"
if test "$ompi_sthread_c_success" = "1" -a \
"$ompi_sthread_cxx_success" = "1" -a \
"$ompi_sthread_f77_success" = "1"; then
"$ompi_sthread_fc_success" = "1"; then
internal_useless=1
$1
else
@ -244,7 +245,7 @@ else
$2
fi
unset ompi_sthread_c_success ompi_sthread_f77_success ompi_sthread_cxx_success
unset ompi_sthread_c_success ompi_sthread_fc_success ompi_sthread_cxx_success
unset internal_useless
])dnl

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

@ -10,6 +10,7 @@ dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
dnl University of Stuttgart. All rights reserved.
dnl Copyright (c) 2004-2005 The Regents of the University of California.
dnl All rights reserved.
dnl Copyright (c) 2012 Cisco Systems, Inc. All rights reserved.
dnl $COPYRIGHT$
dnl
dnl Additional copyrights may follow
@ -127,7 +128,7 @@ dnl esac
export CFLAGS CPPFLAGS
export CXXFLAGS CXXCPPFLAGS
export FFLAGS
export FCFLAGS
export LDFLAGS LIBS
sub_configure="$SHELL '$subdir_srcdir/configure'"
AC_MSG_NOTICE([running $sub_configure $subdir_args --cache-file=$subdir_cache_file --srcdir=$subdir_srcdir --disable-option-checking])

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

@ -126,7 +126,6 @@ AC_DEFUN([OMPI_SETUP_FC],[
integer :: i
end program]])],
[OMPI_FORTRAN_WRAPPER_FLAGS="-Wl,-commons,use_dylibs"
WRAPPER_EXTRA_FFLAGS="$WRAPPER_EXTRA_FFLAGS $OMPI_FORTRAN_WRAPPER_FLAGS"
WRAPPER_EXTRA_FCFLAGS="$WRAPPER_EXTRA_FCFLAGS $OMPI_FORTRAN_WRAPPER_FLAGS"],
[OMPI_FORTRAN_WRAPPER_FLAGS=none])
AC_LANG_POP([Fortran])
@ -176,7 +175,7 @@ EOF
[AC_MSG_CHECKING([to see if Fortran compiler likes the C++ exception flags])
AS_IF([test "$OMPI_CXX_EXCEPTIONS_CXXFLAGS" = ""],
[AC_MSG_RESULT([skipped (no C++ exceptions flags)])],
[FCFLAGS="$FFLAGS $OMPI_CXX_EXCEPTIONS_CXXFLAGS"
[FCFLAGS="$FCFLAGS $OMPI_CXX_EXCEPTIONS_CXXFLAGS"
AC_LANG_PUSH([Fortran])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[
INTEGER I