1
1

Some changes to better support cross-compiling OMPI:

- fall back to compile test for windows paffinity component
    when cross compiling
  - fall back to platform guess when checking for threads having
    different pids with pthreads (yes on linux, no elsewhere)
  - pass the proper host, target, and build flags to the
    ROMIO configure script

With these changes, cross-compiling should be possible with the exception
of the Fortran 77 and Fortran 90 bindings.  Fortran 77 can be cross-
compiled if cache values are provided for type sizes and alignment.

This commit was SVN r8702.
Этот коммит содержится в:
Brian Barrett 2006-01-16 04:00:44 +00:00
родитель a4abe3bdbe
Коммит 17d2c907fc
3 изменённых файлов: 39 добавлений и 13 удалений

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

@ -1,5 +1,5 @@
dnl
dnl Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
dnl Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
dnl University Research and Technology
dnl Corporation. All rights reserved.
dnl Copyright (c) 2004-2005 The University of Tennessee and The University
@ -62,7 +62,18 @@ void *checkpid(void *arg) {
pthread_exit((void *) ret);
}],
[MSG=no OMPI_THREADS_HAVE_DIFFERENT_PIDS=0],
[MSG=yes OMPI_THREADS_HAVE_DIFFERENT_PIDS=1])
[MSG=yes OMPI_THREADS_HAVE_DIFFERENT_PIDS=1],
[case $host in
*-linux*)
MSG="cross compiling - assuming yes"
OMPI_THREADS_HAVE_DIFFERENT_PIDS=1
;;
*)
MSG="cross compiling - assuming no"
OMPI_THREADS_HAVE_DIFFERENT_PIDS=0
;;
esac
])
CPPFLAGS="$CPPFLAGS_save"
LDFLAGS="$LDFLAGS_save"

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

@ -1,6 +1,6 @@
# -*- shell-script -*-
#
# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The University of Tennessee and The University
@ -58,7 +58,13 @@ AC_DEFUN([MCA_io_romio_CONFIG],[
AS_IF([test -n "$prefix" -a "$prefix" != "NONE"],
[io_romio_prefix_arg="--prefix=$prefix"],
[io_romio_prefix_arg=])
io_romio_flags="CFLAGS="'"'"$CFLAGS"'"'" CPPFLAGS="'"'"$CPPFLAGS"'"'" FFLAGS="'"'"$FFLAGS"'"'" LDFLAGS="'"'"$LSFLAGS"'"'" --$io_romio_shared-shared --$io_romio_static-static $io_romio_flags $io_romio_prefix_arg --with-mpi=open_mpi"
io_romio_flags=
AS_IF([test "$cross_compiling" = "yes"],
[AS_IF([test ! -z $build], [io_romio_flags="$io_romio_flags --build=$build"])
AS_IF([test ! -z $host], [io_romio_flags="$io_romio_flags --host=$host"])
AS_IF([test ! -z $target], [io_romio_flags="$io_romio_flags --target=$target"])])
io_romio_flags="$io_romio_flags CFLAGS="'"'"$CFLAGS"'"'" CPPFLAGS="'"'"$CPPFLAGS"'"'" FFLAGS="'"'"$FFLAGS"'"'" LDFLAGS="'"'"$LSFLAGS"'"'" --$io_romio_shared-shared --$io_romio_static-static $io_romio_flags $io_romio_prefix_arg --with-mpi=open_mpi"
ompi_show_subtitle "Configuring ROMIO distribution"
OMPI_CONFIG_SUBDIR([ompi/mca/io/romio/romio],

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

@ -1,6 +1,6 @@
# -*- shell-script -*-
#
# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The University of Tennessee and The University
@ -25,12 +25,21 @@ AC_DEFUN([MCA_paffinity_windows_CONFIG],[
# and then check for it's presence in the kernel32 library.
AC_MSG_CHECKING(for working GetProcessAffinityMask)
AC_TRY_RUN( [#include <windows.h>
int main( int argc, char** argv ) {
DWORD aff, mask;
GetProcessAffinityMask( NULL, &aff, &mask );
return 0; }],
[AC_MSG_RESULT(yes)
$1],
[AC_MSG_RESULT(yes)
$2])
int main( int argc, char** argv ) {
DWORD aff, mask;
GetProcessAffinityMask( NULL, &aff, &mask );
return 0; }],
[AC_MSG_RESULT([yes])
$1],
[AC_MSG_RESULT([no])
$2],
[AC_COMPILE_IFELSE([#include <windows.h>
int main( int argc, char** argv ) {
DWORD aff, mask;
GetProcessAffinityMask( NULL, &aff, &mask );
return 0; }],
[AC_MSG_RESULT([yes])
$1],
[AC_MSG_RESULT([no])
$2])])
])dnl