1
1

Create new entries in the wrapper data files so the

administrator can specify compiler flags that get
inserted into the command before the user's flags.
These flags can be specified at configure time.
Reviewed by Jeff Squyres.

This fixes ticket #2474.

This commit was SVN r23709.
Этот коммит содержится в:
Rolf vandeVaart 2010-09-02 10:47:55 +00:00
родитель 48274c1c77
Коммит 14e7bcc383
14 изменённых файлов: 183 добавлений и 12 удалений

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

@ -10,8 +10,7 @@ dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
dnl University of Stuttgart. All rights reserved. dnl University of Stuttgart. All rights reserved.
dnl Copyright (c) 2004-2005 The Regents of the University of California. dnl Copyright (c) 2004-2005 The Regents of the University of California.
dnl All rights reserved. dnl All rights reserved.
dnl Copyright (c) 2006 Sun Microsystems, Inc. All rights reserved. dnl Copyright (c) 2006-2010 Oracle and/or its affiliates. All rights reserved.
dnl Use is subject to license terms.
dnl Copyright (c) 2009 Cisco Systems, Inc. All rights reserved. dnl Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
dnl $COPYRIGHT$ dnl $COPYRIGHT$
dnl dnl
@ -31,9 +30,13 @@ dnl
# unexpected behavior for the user in the past. # unexpected behavior for the user in the past.
AC_DEFUN([OMPI_SETUP_WRAPPER_INIT],[ AC_DEFUN([OMPI_SETUP_WRAPPER_INIT],[
WRAPPER_EXTRA_FFLAGS= WRAPPER_EXTRA_FFLAGS=
WRAPPER_EXTRA_FFLAGS_PREFIX=
WRAPPER_EXTRA_FCFLAGS= WRAPPER_EXTRA_FCFLAGS=
WRAPPER_EXTRA_FCFLAGS_PREFIX=
USER_WRAPPER_EXTRA_FFLAGS= USER_WRAPPER_EXTRA_FFLAGS=
USER_WRAPPER_EXTRA_FFLAGS_PREFIX=
USER_WRAPPER_EXTRA_FCFLAGS= USER_WRAPPER_EXTRA_FCFLAGS=
USER_WRAPPER_EXTRA_FCLAGS_PREFIX=
AC_ARG_WITH([wrapper-fflags], AC_ARG_WITH([wrapper-fflags],
[AC_HELP_STRING([--with-wrapper-fflags], [AC_HELP_STRING([--with-wrapper-fflags],
@ -44,6 +47,15 @@ AC_DEFUN([OMPI_SETUP_WRAPPER_INIT],[
USER_WRAPPER_EXTRA_FFLAGS="$with_wrapper_fflags" USER_WRAPPER_EXTRA_FFLAGS="$with_wrapper_fflags"
fi fi
AC_ARG_WITH([wrapper-fflags-prefix],
[AC_HELP_STRING([--with-wrapper-fflags-prefix],
[Extra flags (before user flags) to add to FFLAGS when using mpif77])])
if test "$with_wrapper_fflags_prefix" = "yes" -o "$with_wrapper_fflags_prefix" = "no"; then
AC_MSG_ERROR([--with-wrapper-fflags-prefix must have an argument. Aborting])
elif test ! -z "$with_wrapper_fflags_prefix" ; then
USER_WRAPPER_EXTRA_FFLAGS_PREFIX="$with_wrapper_fflags_prefix"
fi
AC_ARG_WITH([wrapper-fcflags], AC_ARG_WITH([wrapper-fcflags],
[AC_HELP_STRING([--with-wrapper-fcflags], [AC_HELP_STRING([--with-wrapper-fcflags],
[Extra flags to add to FCFLAGS when using mpif90])]) [Extra flags to add to FCFLAGS when using mpif90])])
@ -52,6 +64,16 @@ AC_DEFUN([OMPI_SETUP_WRAPPER_INIT],[
elif test ! -z "$with_wrapper_fcflags" ; then elif test ! -z "$with_wrapper_fcflags" ; then
USER_WRAPPER_EXTRA_FCFLAGS="$with_wrapper_fcflags" USER_WRAPPER_EXTRA_FCFLAGS="$with_wrapper_fcflags"
fi fi
AC_ARG_WITH([wrapper-fcflags-prefix],
[AC_HELP_STRING([--with-wrapper-fcflags-prefix],
[Extra flags (before user flags) to add to FCFLAGS when using mpif90])])
if test "$with_wrapper_fcflags_prefix" = "yes" -o "$with_wrapper_fcflags_prefix" = "no"; then
AC_MSG_ERROR([--with-wrapper-fcflags-prefix must have an argument. Aborting])
elif test ! -z "$with_wrapper_fcflags_prefix" ; then
USER_WRAPPER_EXTRA_FCFLAGS_PREFIX="$with_wrapper_fcflags_prefix"
fi
]) ])
AC_DEFUN([_OMPI_SETUP_ORTE_WRAPPERS],[ AC_DEFUN([_OMPI_SETUP_ORTE_WRAPPERS],[
@ -65,21 +87,41 @@ AC_DEFUN([_OMPI_SETUP_ORTE_WRAPPERS],[
AC_SUBST([OMPI_WRAPPER_EXTRA_CFLAGS]) AC_SUBST([OMPI_WRAPPER_EXTRA_CFLAGS])
AC_MSG_RESULT([$OMPI_WRAPPER_EXTRA_CFLAGS]) AC_MSG_RESULT([$OMPI_WRAPPER_EXTRA_CFLAGS])
AC_MSG_CHECKING([for OMPI CFLAGS_PREFIX])
OMPI_WRAPPER_EXTRA_CFLAGS_PREFIX="$ORTE_WRAPPER_EXTRA_CFLAGS_PREFIX"
AC_SUBST([OMPI_WRAPPER_EXTRA_CFLAGS_PREFIX])
AC_MSG_RESULT([$OMPI_WRAPPER_EXTRA_CFLAGS_PREFIX])
AC_MSG_CHECKING([for OMPI CXXFLAGS]) AC_MSG_CHECKING([for OMPI CXXFLAGS])
OMPI_WRAPPER_EXTRA_CXXFLAGS="$ORTE_WRAPPER_EXTRA_CXXFLAGS" OMPI_WRAPPER_EXTRA_CXXFLAGS="$ORTE_WRAPPER_EXTRA_CXXFLAGS"
AC_SUBST([OMPI_WRAPPER_EXTRA_CXXFLAGS]) AC_SUBST([OMPI_WRAPPER_EXTRA_CXXFLAGS])
AC_MSG_RESULT([$OMPI_WRAPPER_EXTRA_CXXFLAGS]) AC_MSG_RESULT([$OMPI_WRAPPER_EXTRA_CXXFLAGS])
AC_MSG_CHECKING([for OMPI CXXFLAGS_PREFIX])
OMPI_WRAPPER_EXTRA_CXXFLAGS_PREFIX="$ORTE_WRAPPER_EXTRA_CXXFLAGS_PREFIX"
AC_SUBST([OMPI_WRAPPER_EXTRA_CXXFLAGS_PREFIX])
AC_MSG_RESULT([$OMPI_WRAPPER_EXTRA_CXXFLAGS_PREFIX])
AC_MSG_CHECKING([for OMPI FFLAGS]) AC_MSG_CHECKING([for OMPI FFLAGS])
OMPI_WRAPPER_EXTRA_FFLAGS="$WRAPPER_EXTRA_FFLAGS $USER_WRAPPER_EXTRA_FFLAGS" OMPI_WRAPPER_EXTRA_FFLAGS="$WRAPPER_EXTRA_FFLAGS $USER_WRAPPER_EXTRA_FFLAGS"
AC_SUBST([OMPI_WRAPPER_EXTRA_FFLAGS]) AC_SUBST([OMPI_WRAPPER_EXTRA_FFLAGS])
AC_MSG_RESULT([$OMPI_WRAPPER_EXTRA_FFLAGS]) AC_MSG_RESULT([$OMPI_WRAPPER_EXTRA_FFLAGS])
AC_MSG_CHECKING([for OMPI FFLAGS_PREFIX])
OMPI_WRAPPER_EXTRA_FFLAGS_PREFIX="$WRAPPER_EXTRA_FFLAGS_PREFIX $USER_WRAPPER_EXTRA_FFLAGS_PREFIX"
AC_SUBST([OMPI_WRAPPER_EXTRA_FFLAGS_PREFIX])
AC_MSG_RESULT([$OMPI_WRAPPER_EXTRA_FFLAGS_PREFIX])
AC_MSG_CHECKING([for OMPI FCFLAGS]) AC_MSG_CHECKING([for OMPI FCFLAGS])
OMPI_WRAPPER_EXTRA_FCFLAGS="$WRAPPER_EXTRA_FCFLAGS $USER_WRAPPER_EXTRA_FCFLAGS" OMPI_WRAPPER_EXTRA_FCFLAGS="$WRAPPER_EXTRA_FCFLAGS $USER_WRAPPER_EXTRA_FCFLAGS"
AC_SUBST([OMPI_WRAPPER_EXTRA_FCFLAGS]) AC_SUBST([OMPI_WRAPPER_EXTRA_FCFLAGS])
AC_MSG_RESULT([$OMPI_WRAPPER_EXTRA_FCFLAGS]) AC_MSG_RESULT([$OMPI_WRAPPER_EXTRA_FCFLAGS])
AC_MSG_CHECKING([for OMPI FCFLAGS_PREFIX])
OMPI_WRAPPER_EXTRA_FCFLAGS_PREFIX="$WRAPPER_EXTRA_FCFLAGS_PREFIX $USER_WRAPPER_EXTRA_FCFLAGS_PREFIX"
AC_SUBST([OMPI_WRAPPER_EXTRA_FCFLAGS_PREFIX])
AC_MSG_RESULT([$OMPI_WRAPPER_EXTRA_FCFLAGS_PREFIX])
AC_MSG_CHECKING([for OMPI LDFLAGS]) AC_MSG_CHECKING([for OMPI LDFLAGS])
OMPI_WRAPPER_EXTRA_LDFLAGS="$ompi_WRAPPER_EXTRA_LDFLAGS $ORTE_WRAPPER_EXTRA_LDFLAGS" OMPI_WRAPPER_EXTRA_LDFLAGS="$ompi_WRAPPER_EXTRA_LDFLAGS $ORTE_WRAPPER_EXTRA_LDFLAGS"
AC_SUBST([OMPI_WRAPPER_EXTRA_LDFLAGS]) AC_SUBST([OMPI_WRAPPER_EXTRA_LDFLAGS])
@ -107,21 +149,41 @@ AC_DEFUN([_OMPI_SETUP_OPAL_WRAPPERS],[
AC_SUBST([OMPI_WRAPPER_EXTRA_CFLAGS]) AC_SUBST([OMPI_WRAPPER_EXTRA_CFLAGS])
AC_MSG_RESULT([$OMPI_WRAPPER_EXTRA_CFLAGS]) AC_MSG_RESULT([$OMPI_WRAPPER_EXTRA_CFLAGS])
AC_MSG_CHECKING([for OMPI CFLAGS_PREFIX])
OMPI_WRAPPER_EXTRA_CFLAGS_PREFIX="$OPAL_WRAPPER_EXTRA_CFLAGS_PREFIX"
AC_SUBST([OMPI_WRAPPER_EXTRA_CFLAGS_PREFIX])
AC_MSG_RESULT([$OMPI_WRAPPER_EXTRA_CFLAGS_PREFIX])
AC_MSG_CHECKING([for OMPI CXXFLAGS]) AC_MSG_CHECKING([for OMPI CXXFLAGS])
OMPI_WRAPPER_EXTRA_CXXFLAGS="$OPAL_WRAPPER_EXTRA_CXXFLAGS" OMPI_WRAPPER_EXTRA_CXXFLAGS="$OPAL_WRAPPER_EXTRA_CXXFLAGS"
AC_SUBST([OMPI_WRAPPER_EXTRA_CXXFLAGS]) AC_SUBST([OMPI_WRAPPER_EXTRA_CXXFLAGS])
AC_MSG_RESULT([$OMPI_WRAPPER_EXTRA_CXXFLAGS]) AC_MSG_RESULT([$OMPI_WRAPPER_EXTRA_CXXFLAGS])
AC_MSG_CHECKING([for OMPI CXXFLAGS_PREFIX])
OMPI_WRAPPER_EXTRA_CXXFLAGS_PREFIX="$OPAL_WRAPPER_EXTRA_CXXFLAGS_PREFIX"
AC_SUBST([OMPI_WRAPPER_EXTRA_CXXFLAGS_PREFIX])
AC_MSG_RESULT([$OMPI_WRAPPER_EXTRA_CXXFLAGS])
AC_MSG_CHECKING([for OMPI FFLAGS]) AC_MSG_CHECKING([for OMPI FFLAGS])
OMPI_WRAPPER_EXTRA_FFLAGS="$WRAPPER_EXTRA_FFLAGS $USER_WRAPPER_EXTRA_FFLAGS" OMPI_WRAPPER_EXTRA_FFLAGS="$WRAPPER_EXTRA_FFLAGS $USER_WRAPPER_EXTRA_FFLAGS"
AC_SUBST([OMPI_WRAPPER_EXTRA_FFLAGS]) AC_SUBST([OMPI_WRAPPER_EXTRA_FFLAGS])
AC_MSG_RESULT([$OMPI_WRAPPER_EXTRA_FFLAGS]) AC_MSG_RESULT([$OMPI_WRAPPER_EXTRA_FFLAGS])
AC_MSG_CHECKING([for OMPI FFLAGS_PREFIX])
OMPI_WRAPPER_EXTRA_FFLAGS_PREFIX="$WRAPPER_EXTRA_FFLAGS_PREFIX $USER_WRAPPER_EXTRA_FFLAGS_PREFIX"
AC_SUBST([OMPI_WRAPPER_EXTRA_FFLAGS_PREFIX])
AC_MSG_RESULT([$OMPI_WRAPPER_EXTRA_FFLAGS_PREFIX])
AC_MSG_CHECKING([for OMPI FCFLAGS]) AC_MSG_CHECKING([for OMPI FCFLAGS])
OMPI_WRAPPER_EXTRA_FCFLAGS="$WRAPPER_EXTRA_FCFLAGS $USER_WRAPPER_EXTRA_FCFLAGS" OMPI_WRAPPER_EXTRA_FCFLAGS="$WRAPPER_EXTRA_FCFLAGS $USER_WRAPPER_EXTRA_FCFLAGS"
AC_SUBST([OMPI_WRAPPER_EXTRA_FCFLAGS]) AC_SUBST([OMPI_WRAPPER_EXTRA_FCFLAGS])
AC_MSG_RESULT([$OMPI_WRAPPER_EXTRA_FCFLAGS]) AC_MSG_RESULT([$OMPI_WRAPPER_EXTRA_FCFLAGS])
AC_MSG_CHECKING([for OMPI FCFLAGS_PREFIX])
OMPI_WRAPPER_EXTRA_FCFLAGS_PREFIX="$WRAPPER_EXTRA_FCFLAGS_PREFIX $USER_WRAPPER_EXTRA_FCFLAGS_PREFIX"
AC_SUBST([OMPI_WRAPPER_EXTRA_FCFLAGS_PREFIX])
AC_MSG_RESULT([$OMPI_WRAPPER_EXTRA_FCFLAGS_PREFIX])
AC_MSG_CHECKING([for OMPI LDFLAGS]) AC_MSG_CHECKING([for OMPI LDFLAGS])
OMPI_WRAPPER_EXTRA_LDFLAGS="$ompi_WRAPPER_EXTRA_LDFLAGS $OPAL_WRAPPER_EXTRA_LDFLAGS" OMPI_WRAPPER_EXTRA_LDFLAGS="$ompi_WRAPPER_EXTRA_LDFLAGS $OPAL_WRAPPER_EXTRA_LDFLAGS"
AC_SUBST([OMPI_WRAPPER_EXTRA_LDFLAGS]) AC_SUBST([OMPI_WRAPPER_EXTRA_LDFLAGS])
@ -140,7 +202,9 @@ AC_DEFUN([_OMPI_SETUP_OPAL_WRAPPERS],[
AC_DEFUN([OMPI_SETUP_WRAPPER_FINAL],[ AC_DEFUN([OMPI_SETUP_WRAPPER_FINAL],[
OMPI_UNIQ([WRAPPER_EXTRA_FFLAGS]) OMPI_UNIQ([WRAPPER_EXTRA_FFLAGS])
OMPI_UNIQ([WRAPPER_EXTRA_FFLAGS_PREFIX])
OMPI_UNIQ([WRAPPER_EXTRA_FCFLAGS]) OMPI_UNIQ([WRAPPER_EXTRA_FCFLAGS])
OMPI_UNIQ([WRAPPER_EXTRA_FCFLAGS_PREFIX])
OMPI_UNIQ([ompi_WRAPPER_EXTRA_LDFLAGS]) OMPI_UNIQ([ompi_WRAPPER_EXTRA_LDFLAGS])
OMPI_UNIQ([ompi_WRAPPER_EXTRA_LIBS]) OMPI_UNIQ([ompi_WRAPPER_EXTRA_LIBS])
@ -190,14 +254,23 @@ AC_DEFUN([OMPI_SETUP_WRAPPER_FINAL],[
# compatibility defines that will eventually go away # compatibility defines that will eventually go away
WRAPPER_EXTRA_FFLAGS="$OMPI_WRAPPER_EXTRA_FFLAGS" WRAPPER_EXTRA_FFLAGS="$OMPI_WRAPPER_EXTRA_FFLAGS"
WRAPPER_EXTRA_FFLAGS_PREFIX="$OMPI_WRAPPER_EXTRA_FFLAGS_PREFIX"
WRAPPER_EXTRA_FCFLAGS="$OMPI_WRAPPER_EXTRA_FCFLAGS" WRAPPER_EXTRA_FCFLAGS="$OMPI_WRAPPER_EXTRA_FCFLAGS"
WRAPPER_EXTRA_FCFLAGS_PREFIX="$OMPI_WRAPPER_EXTRA_FCFLAGS_PREFIX"
AC_SUBST([WRAPPER_EXTRA_FFLAGS]) AC_SUBST([WRAPPER_EXTRA_FFLAGS])
AC_SUBST([WRAPPER_EXTRA_FFLAGS_PREFIX])
AC_SUBST([WRAPPER_EXTRA_FCFLAGS]) AC_SUBST([WRAPPER_EXTRA_FCFLAGS])
AC_SUBST([WRAPPER_EXTRA_FCFLAGS_PREFIX])
AC_DEFINE_UNQUOTED(WRAPPER_EXTRA_FFLAGS, "$WRAPPER_EXTRA_FFLAGS", AC_DEFINE_UNQUOTED(WRAPPER_EXTRA_FFLAGS, "$WRAPPER_EXTRA_FFLAGS",
[Additional FFLAGS to pass through the wrapper compilers]) [Additional FFLAGS to pass through the wrapper compilers])
AC_DEFINE_UNQUOTED(WRAPPER_EXTRA_FFLAGS_PREFIX, "$WRAPPER_EXTRA_FFLAGS_PREFIX",
[Additional FFLAGS to pass through the wrapper compilers])
AC_DEFINE_UNQUOTED(WRAPPER_EXTRA_FCFLAGS, "$WRAPPER_EXTRA_FCFLAGS", AC_DEFINE_UNQUOTED(WRAPPER_EXTRA_FCFLAGS, "$WRAPPER_EXTRA_FCFLAGS",
[Additional FCFLAGS to pass through the wrapper compilers]) [Additional FCFLAGS to pass through the wrapper compilers])
AC_DEFINE_UNQUOTED(WRAPPER_EXTRA_FCFLAGS_PREFIX, "$WRAPPER_EXTRA_FCFLAGS_PREFIX",
[Additional FCFLAGS to pass through the wrapper compilers])
# if wrapper compilers were requested, set the ompi one up # if wrapper compilers were requested, set the ompi one up
if test "$WANT_SCRIPT_WRAPPER_COMPILERS" = "1" ; then if test "$WANT_SCRIPT_WRAPPER_COMPILERS" = "1" ; then

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

@ -14,6 +14,7 @@ compiler_flags_env=CXXFLAGS
compiler=@CXX@ compiler=@CXX@
extra_includes=@OMPI_WRAPPER_EXTRA_INCLUDES@ extra_includes=@OMPI_WRAPPER_EXTRA_INCLUDES@
preprocessor_flags=@OMPI_WRAPPER_EXTRA_CPPFLAGS@ preprocessor_flags=@OMPI_WRAPPER_EXTRA_CPPFLAGS@
compiler_flags_prefix=@OMPI_WRAPPER_EXTRA_CXXFLAGS_PREFIX@
compiler_flags=@OMPI_WRAPPER_EXTRA_CXXFLAGS@ compiler_flags=@OMPI_WRAPPER_EXTRA_CXXFLAGS@
linker_flags=@OMPI_WRAPPER_EXTRA_LDFLAGS@ linker_flags=@OMPI_WRAPPER_EXTRA_LDFLAGS@
libs=@OMPI_WRAPPER_CXX_LIB@ -lmpi @OMPI_WRAPPER_EXTRA_LIBS@ libs=@OMPI_WRAPPER_CXX_LIB@ -lmpi @OMPI_WRAPPER_EXTRA_LIBS@

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

@ -14,6 +14,7 @@ compiler_flags_env=CFLAGS
compiler=@CC@ compiler=@CC@
extra_includes=@OMPI_WRAPPER_EXTRA_INCLUDES@ extra_includes=@OMPI_WRAPPER_EXTRA_INCLUDES@
preprocessor_flags=@OMPI_WRAPPER_EXTRA_CPPFLAGS@ preprocessor_flags=@OMPI_WRAPPER_EXTRA_CPPFLAGS@
compiler_flags_prefix=@OMPI_WRAPPER_EXTRA_CFLAGS_PREFIX@
compiler_flags=@OMPI_WRAPPER_EXTRA_CFLAGS@ compiler_flags=@OMPI_WRAPPER_EXTRA_CFLAGS@
linker_flags=@OMPI_WRAPPER_EXTRA_LDFLAGS@ linker_flags=@OMPI_WRAPPER_EXTRA_LDFLAGS@
libs=-lmpi @OMPI_WRAPPER_EXTRA_LIBS@ libs=-lmpi @OMPI_WRAPPER_EXTRA_LIBS@

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

@ -14,6 +14,7 @@ compiler_flags_env=FFLAGS
compiler=@F77@ compiler=@F77@
extra_includes= extra_includes=
preprocessor_flags= preprocessor_flags=
compiler_flags_prefix=@OMPI_WRAPPER_EXTRA_FFLAGS_PREFIX@
compiler_flags=@OMPI_WRAPPER_EXTRA_FFLAGS@ compiler_flags=@OMPI_WRAPPER_EXTRA_FFLAGS@
linker_flags=@OMPI_WRAPPER_EXTRA_LDFLAGS@ linker_flags=@OMPI_WRAPPER_EXTRA_LDFLAGS@
libs=-lmpi_f77 -lmpi @OMPI_WRAPPER_EXTRA_LIBS@ libs=-lmpi_f77 -lmpi @OMPI_WRAPPER_EXTRA_LIBS@

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

@ -15,6 +15,7 @@ compiler=@FC@
module_option=@OMPI_FC_MODULE_FLAG@ module_option=@OMPI_FC_MODULE_FLAG@
extra_includes= extra_includes=
preprocessor_flags= preprocessor_flags=
compiler_flags_prefix=@OMPI_WRAPPER_EXTRA_FCFLAGS_PREFIX@
compiler_flags=@OMPI_WRAPPER_EXTRA_FCFLAGS@ compiler_flags=@OMPI_WRAPPER_EXTRA_FCFLAGS@
linker_flags=@OMPI_WRAPPER_EXTRA_LDFLAGS@ linker_flags=@OMPI_WRAPPER_EXTRA_LDFLAGS@
libs=-lmpi_f90 -lmpi_f77 -lmpi @OMPI_WRAPPER_EXTRA_LIBS@ libs=-lmpi_f90 -lmpi_f77 -lmpi @OMPI_WRAPPER_EXTRA_LIBS@

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

@ -2,6 +2,7 @@
# -*- perl -*- # -*- perl -*-
# #
# Copyright (c) 2009-2010 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2009-2010 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved.
# $COPYRIGHT$ # $COPYRIGHT$
# #
# Additional copyrights may follow # Additional copyrights may follow
@ -32,8 +33,11 @@ my $FC = "@FC@";
my $extra_includes = "@OMPI_WRAPPER_EXTRA_INCLUDES@"; my $extra_includes = "@OMPI_WRAPPER_EXTRA_INCLUDES@";
my $extra_cppflags = "@OMPI_WRAPPER_EXTRA_CPPFLAGS@"; my $extra_cppflags = "@OMPI_WRAPPER_EXTRA_CPPFLAGS@";
my $extra_cflags = "@OMPI_WRAPPER_EXTRA_CFLAGS@"; my $extra_cflags = "@OMPI_WRAPPER_EXTRA_CFLAGS@";
my $extra_cflags_prefix = "@ORTE_WRAPPER_EXTRA_CFLAGS_PREFIX@";
my $extra_cxxflags = "@OMPI_WRAPPER_EXTRA_CXXFLAGS@"; my $extra_cxxflags = "@OMPI_WRAPPER_EXTRA_CXXFLAGS@";
my $extra_cxxflags_prefix = "@ORTE_WRAPPER_EXTRA_CXXFLAGS_PREFIX@";
my $extra_fflags = "@OMPI_WRAPPER_EXTRA_FFLAGS@"; my $extra_fflags = "@OMPI_WRAPPER_EXTRA_FFLAGS@";
my $extra_fflags_prefix = "@OMPI_WRAPPER_EXTRA_FFLAGS_PREFIX@";
my $extra_ldflags = "@OMPI_WRAPPER_EXTRA_LDFLAGS@"; my $extra_ldflags = "@OMPI_WRAPPER_EXTRA_LDFLAGS@";
my $extra_libs = "@OMPI_WRAPPER_EXTRA_LIBS@"; my $extra_libs = "@OMPI_WRAPPER_EXTRA_LIBS@";
my $cxx_lib = "@OMPI_WRAPPER_CXX_LIB@"; my $cxx_lib = "@OMPI_WRAPPER_CXX_LIB@";
@ -47,6 +51,7 @@ my $lang = "none";
my $comp = ""; # this is a sentinal from configure my $comp = ""; # this is a sentinal from configure
my $preproc_flags = $include_flag . $includedir; my $preproc_flags = $include_flag . $includedir;
my $comp_flags = ""; my $comp_flags = "";
my $comp_flags_prefix = "";
my $linker_flags = $libdir_flag . $libdir . " " . $extra_ldflags; my $linker_flags = $libdir_flag . $libdir . " " . $extra_ldflags;
my $libs = "-lmpi -lopen-rte -lopen-pal " . $extra_libs; my $libs = "-lmpi -lopen-rte -lopen-pal " . $extra_libs;
@ -82,18 +87,21 @@ if (basename($0) eq "mpicc") {
$comp = check_env("CC", $CC); $comp = check_env("CC", $CC);
$preproc_flags .= " " . add_extra_includes(); $preproc_flags .= " " . add_extra_includes();
$comp_flags = $extra_cflags; $comp_flags = $extra_cflags;
$comp_flags_prefix = $extra_cflags_prefix;
# no special libs for C # no special libs for C
} elsif (basename($0) eq "mpic++" || basename($0) eq "mpiCC" || basename($0) eq "mpicxx") { } elsif (basename($0) eq "mpic++" || basename($0) eq "mpiCC" || basename($0) eq "mpicxx") {
$lang = "C++"; $lang = "C++";
$comp = check_env("CXX", $CXX); $comp = check_env("CXX", $CXX);
$preproc_flags .= " " . add_extra_includes(); $preproc_flags .= " " . add_extra_includes();
$comp_flags = $extra_cxxflags; $comp_flags = $extra_cxxflags;
$comp_flags_prefix = $extra_cxxflags_prefix;
$libs = $cxx_lib . " " . $libs; $libs = $cxx_lib . " " . $libs;
} elsif (basename($0) eq "mpif77") { } elsif (basename($0) eq "mpif77") {
$lang = "F77"; $lang = "F77";
$comp = check_env("F77", $F77); $comp = check_env("F77", $F77);
# no extra includes for F77. # no extra includes for F77.
$comp_flags = $extra_fflags; $comp_flags = $extra_fflags;
$comp_flags_prefix = $extra_fflags_prefix;
$libs = "-lmpi_f77 " . $libs; $libs = "-lmpi_f77 " . $libs;
} elsif (basename($0) eq "mpif90") { } elsif (basename($0) eq "mpif90") {
$lang = "F90"; $lang = "F90";
@ -160,8 +168,12 @@ my @exec_argv = ();
# assemble command # assemble command
push(@exec_argv, split(' ', $comp)); push(@exec_argv, split(' ', $comp));
# Per https://svn.open-mpi.org/trac/ompi/ticket/2201, add all the user # Per tickets https://svn.open-mpi.org/trac/ompi/ticket/2474, and
# arguments before anything else. # https://svn.open-mpi.org/trac/ompi/ticket/2201, construct command
# with some system arguments before user arguments and some after.
if ($want_compile == 1) {
push(@exec_argv, split(' ', $comp_flags_prefix));
}
push(@exec_argv, @appargs); push(@exec_argv, @appargs);
if ($want_preproc == 1) { if ($want_preproc == 1) {
push(@exec_argv, split(' ', $preproc_flags)); push(@exec_argv, split(' ', $preproc_flags));

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

@ -10,8 +10,7 @@ dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
dnl University of Stuttgart. All rights reserved. dnl University of Stuttgart. All rights reserved.
dnl Copyright (c) 2004-2005 The Regents of the University of California. dnl Copyright (c) 2004-2005 The Regents of the University of California.
dnl All rights reserved. dnl All rights reserved.
dnl Copyright (c) 2006 Sun Microsystems, Inc. All rights reserved. dnl Copyright (c) 2006-2010 Oracle and/or its affiliates. All rights reserved.
dnl Use is subject to license terms.
dnl Copyright (c) 2009 Cisco Systems, Inc. All rights reserved. dnl Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
dnl $COPYRIGHT$ dnl $COPYRIGHT$
dnl dnl
@ -32,12 +31,16 @@ dnl
AC_DEFUN([OPAL_SETUP_WRAPPER_INIT],[ AC_DEFUN([OPAL_SETUP_WRAPPER_INIT],[
WRAPPER_EXTRA_CPPFLAGS= WRAPPER_EXTRA_CPPFLAGS=
WRAPPER_EXTRA_CFLAGS= WRAPPER_EXTRA_CFLAGS=
WRAPPER_EXTRA_CFLAGS_PREFIX=
WRAPPER_EXTRA_CXXFLAGS= WRAPPER_EXTRA_CXXFLAGS=
WRAPPER_EXTRA_CXXFLAGS_PREFIX=
WRAPPER_EXTRA_LDFLAGS= WRAPPER_EXTRA_LDFLAGS=
WRAPPER_EXTRA_LIBS= WRAPPER_EXTRA_LIBS=
USER_WRAPPER_EXTRA_CFLAGS= USER_WRAPPER_EXTRA_CFLAGS=
USER_WRAPPER_EXTRA_CFLAGS_PREFIX=
USER_WRAPPER_EXTRA_CXXFLAGS= USER_WRAPPER_EXTRA_CXXFLAGS=
USER_WRAPPER_EXTRA_CXXFLAGS_PREFIX=
USER_WRAPPER_EXTRA_LDFLAGS= USER_WRAPPER_EXTRA_LDFLAGS=
USER_WRAPPER_EXTRA_LIBS= USER_WRAPPER_EXTRA_LIBS=
@ -50,6 +53,15 @@ AC_DEFUN([OPAL_SETUP_WRAPPER_INIT],[
USER_WRAPPER_EXTRA_CFLAGS="$with_wrapper_cflags" USER_WRAPPER_EXTRA_CFLAGS="$with_wrapper_cflags"
fi fi
AC_ARG_WITH([wrapper-cflags-prefix],
[AC_HELP_STRING([--with-wrapper-cflags-prefix],
[Extra flags to add to CFLAGS when using mpicc])])
if test "$with_wrapper_cflags_prefix" = "yes" -o "$with_wrapper_cflags_prefix" = "no"; then
AC_MSG_ERROR([--with-wrapper-cflags-prefix must have an argument. Aborting])
elif test ! -z "$with_wrapper_cflags_prefix" ; then
USER_WRAPPER_EXTRA_CFLAGS_PREFIX="$with_wrapper_cflags_prefix"
fi
AC_ARG_WITH([wrapper-cxxflags], AC_ARG_WITH([wrapper-cxxflags],
[AC_HELP_STRING([--with-wrapper-cxxflags], [AC_HELP_STRING([--with-wrapper-cxxflags],
[Extra flags to add to CXXFLAGS when using mpiCC/mpic++])]) [Extra flags to add to CXXFLAGS when using mpiCC/mpic++])])
@ -59,6 +71,14 @@ AC_DEFUN([OPAL_SETUP_WRAPPER_INIT],[
USER_WRAPPER_EXTRA_CXXFLAGS="$with_wrapper_cxxflags" USER_WRAPPER_EXTRA_CXXFLAGS="$with_wrapper_cxxflags"
fi fi
AC_ARG_WITH([wrapper-cxxflags-prefix],
[AC_HELP_STRING([--with-wrapper-cxxflags-prefix],
[Extra flags to add to CXXFLAGS when using mpiCC/mpic++])])
if test "$with_wrapper_cxxflags_prefix" = "yes" -o "$with_wrapper_cxxflags_prefix" = "no"; then
AC_MSG_ERROR([--with-wrapper-cxxflags-prefix must have an argument. Aborting])
elif test ! -z "$with_wrapper_cxxflags_prefix" ; then
USER_WRAPPER_EXTRA_CXXFLAGS_PREFIX="$with_wrapper_cxxflags_prefix"
fi
AC_ARG_WITH([wrapper-ldflags], AC_ARG_WITH([wrapper-ldflags],
[AC_HELP_STRING([--with-wrapper-ldflags], [AC_HELP_STRING([--with-wrapper-ldflags],
@ -83,7 +103,9 @@ AC_DEFUN([OPAL_SETUP_WRAPPER_INIT],[
AC_DEFUN([OPAL_SETUP_WRAPPER_FINAL],[ AC_DEFUN([OPAL_SETUP_WRAPPER_FINAL],[
OMPI_UNIQ([WRAPPER_EXTRA_CPPFLAGS]) OMPI_UNIQ([WRAPPER_EXTRA_CPPFLAGS])
OMPI_UNIQ([WRAPPER_EXTRA_CFLAGS]) OMPI_UNIQ([WRAPPER_EXTRA_CFLAGS])
OMPI_UNIQ([WRAPPER_EXTRA_CFLAGS_PREFIX])
OMPI_UNIQ([WRAPPER_EXTRA_CXXFLAGS]) OMPI_UNIQ([WRAPPER_EXTRA_CXXFLAGS])
OMPI_UNIQ([WRAPPER_EXTRA_CXXFLAGS_PREFIX])
OMPI_UNIQ([WRAPPER_EXTRA_LDFLAGS]) OMPI_UNIQ([WRAPPER_EXTRA_LDFLAGS])
OMPI_UNIQ([opal_WRAPPER_EXTRA_LDFLAGS]) OMPI_UNIQ([opal_WRAPPER_EXTRA_LDFLAGS])
@ -99,11 +121,21 @@ AC_DEFUN([OPAL_SETUP_WRAPPER_FINAL],[
AC_SUBST([OPAL_WRAPPER_EXTRA_CFLAGS]) AC_SUBST([OPAL_WRAPPER_EXTRA_CFLAGS])
AC_MSG_RESULT([$OPAL_WRAPPER_EXTRA_CFLAGS]) AC_MSG_RESULT([$OPAL_WRAPPER_EXTRA_CFLAGS])
AC_MSG_CHECKING([for OPAL CFLAGS_PREFIX])
OPAL_WRAPPER_EXTRA_CFLAGS_PREFIX="$WRAPPER_EXTRA_CFLAGS_PREFIX $USER_WRAPPER_EXTRA_CFLAGS_PREFIX"
AC_SUBST([OPAL_WRAPPER_EXTRA_CFLAGS_PREFIX])
AC_MSG_RESULT([$OPAL_WRAPPER_EXTRA_CFLAGS_PREFIX])
AC_MSG_CHECKING([for OPAL CXXFLAGS]) AC_MSG_CHECKING([for OPAL CXXFLAGS])
OPAL_WRAPPER_EXTRA_CXXFLAGS="$WRAPPER_EXTRA_CXXFLAGS $USER_WRAPPER_EXTRA_CXXFLAGS" OPAL_WRAPPER_EXTRA_CXXFLAGS="$WRAPPER_EXTRA_CXXFLAGS $USER_WRAPPER_EXTRA_CXXFLAGS"
AC_SUBST([OPAL_WRAPPER_EXTRA_CXXFLAGS]) AC_SUBST([OPAL_WRAPPER_EXTRA_CXXFLAGS])
AC_MSG_RESULT([$OPAL_WRAPPER_EXTRA_CXXFLAGS]) AC_MSG_RESULT([$OPAL_WRAPPER_EXTRA_CXXFLAGS])
AC_MSG_CHECKING([for OPAL CXXFLAGS_PREFIX])
OPAL_WRAPPER_EXTRA_CXXFLAGS_PREFIX="$WRAPPER_EXTRA_CXXFLAGS_PREFIX $USER_WRAPPER_EXTRA_CXXFLAGS_PREFIX"
AC_SUBST([OPAL_WRAPPER_EXTRA_CXXFLAGS_PREFIX])
AC_MSG_RESULT([$OPAL_WRAPPER_EXTRA_CXXFLAGS_PREFIX])
AC_MSG_CHECKING([for OPAL LDFLAGS]) AC_MSG_CHECKING([for OPAL LDFLAGS])
OPAL_WRAPPER_EXTRA_LDFLAGS="$opal_WRAPPER_EXTRA_LDFLAGS $WRAPPER_EXTRA_LDFLAGS $USER_WRAPPER_EXTRA_LDFLAGS" OPAL_WRAPPER_EXTRA_LDFLAGS="$opal_WRAPPER_EXTRA_LDFLAGS $WRAPPER_EXTRA_LDFLAGS $USER_WRAPPER_EXTRA_LDFLAGS"
AC_SUBST([OPAL_WRAPPER_EXTRA_LDFLAGS]) AC_SUBST([OPAL_WRAPPER_EXTRA_LDFLAGS])
@ -136,19 +168,27 @@ AC_DEFUN([OPAL_SETUP_WRAPPER_FINAL],[
# compatibility defines that will eventually go away # compatibility defines that will eventually go away
WRAPPER_EXTRA_CFLAGS="$OPAL_WRAPPER_EXTRA_CFLAGS" WRAPPER_EXTRA_CFLAGS="$OPAL_WRAPPER_EXTRA_CFLAGS"
WRAPPER_EXTRA_CFLAGS_PREFIX="$OPAL_WRAPPER_EXTRA_CFLAGS_PREFIX"
WRAPPER_EXTRA_CXXFLAGS="$OPAL_WRAPPER_EXTRA_CXXFLAGS" WRAPPER_EXTRA_CXXFLAGS="$OPAL_WRAPPER_EXTRA_CXXFLAGS"
WRAPPER_EXTRA_CXXFLAGS_PREFIX="$OPAL_WRAPPER_EXTRA_CXXFLAGS_PREFIX"
WRAPPER_EXTRA_LDFLAGS="$OPAL_WRAPPER_EXTRA_LDFLAGS" WRAPPER_EXTRA_LDFLAGS="$OPAL_WRAPPER_EXTRA_LDFLAGS"
WRAPPER_EXTRA_LIBS="$OPAL_WRAPPER_EXTRA_LIBS" WRAPPER_EXTRA_LIBS="$OPAL_WRAPPER_EXTRA_LIBS"
AC_SUBST([WRAPPER_EXTRA_CFLAGS]) AC_SUBST([WRAPPER_EXTRA_CFLAGS])
AC_SUBST([WRAPPER_EXTRA_CFLAGS_PREFIX])
AC_SUBST([WRAPPER_EXTRA_CXXFLAGS]) AC_SUBST([WRAPPER_EXTRA_CXXFLAGS])
AC_SUBST([WRAPPER_EXTRA_CXXFLAGS_PREFIX])
AC_SUBST([WRAPPER_EXTRA_LDFLAGS]) AC_SUBST([WRAPPER_EXTRA_LDFLAGS])
AC_SUBST([WRAPPER_EXTRA_LIBS]) AC_SUBST([WRAPPER_EXTRA_LIBS])
AC_DEFINE_UNQUOTED(WRAPPER_EXTRA_CFLAGS, "$WRAPPER_EXTRA_CFLAGS", AC_DEFINE_UNQUOTED(WRAPPER_EXTRA_CFLAGS, "$WRAPPER_EXTRA_CFLAGS",
[Additional CFLAGS to pass through the wrapper compilers]) [Additional CFLAGS to pass through the wrapper compilers])
AC_DEFINE_UNQUOTED(WRAPPER_EXTRA_CFLAGS_PREFIX, "$WRAPPER_EXTRA_CFLAGS_PREFIX",
[Additional CFLAGS_PREFIX to pass through the wrapper compilers])
AC_DEFINE_UNQUOTED(WRAPPER_EXTRA_CXXFLAGS, "$WRAPPER_EXTRA_CXXFLAGS", AC_DEFINE_UNQUOTED(WRAPPER_EXTRA_CXXFLAGS, "$WRAPPER_EXTRA_CXXFLAGS",
[Additional CXXFLAGS to pass through the wrapper compilers]) [Additional CXXFLAGS to pass through the wrapper compilers])
AC_DEFINE_UNQUOTED(WRAPPER_EXTRA_CXXFLAGS_PREFIX, "$WRAPPER_EXTRA_CXXFLAGS_PREFIX",
[Additional CXXFLAGS_PREFIX to pass through the wrapper compilers])
AC_DEFINE_UNQUOTED(WRAPPER_EXTRA_LDFLAGS, "$WRAPPER_EXTRA_LDFLAGS", AC_DEFINE_UNQUOTED(WRAPPER_EXTRA_LDFLAGS, "$WRAPPER_EXTRA_LDFLAGS",
[Additional LDFLAGS to pass through the wrapper compilers]) [Additional LDFLAGS to pass through the wrapper compilers])
AC_DEFINE_UNQUOTED(WRAPPER_EXTRA_LIBS, "$WRAPPER_EXTRA_LIBS", AC_DEFINE_UNQUOTED(WRAPPER_EXTRA_LIBS, "$WRAPPER_EXTRA_LIBS",

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

@ -12,6 +12,7 @@
* Copyright (c) 2007 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2007 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2007 Los Alamos National Security, LLC. All rights * Copyright (c) 2007 Los Alamos National Security, LLC. All rights
* reserved. * reserved.
* Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved.
* $COPYRIGHT$ * $COPYRIGHT$
* *
* Additional copyrights may follow * Additional copyrights may follow
@ -75,6 +76,7 @@ struct options_data_t {
char *module_option; char *module_option;
char **preproc_flags; char **preproc_flags;
char **comp_flags; char **comp_flags;
char **comp_flags_prefix;
char **link_flags; char **link_flags;
char **libs; char **libs;
char *req_file; char *req_file;
@ -116,6 +118,8 @@ options_data_init(struct options_data_t *data)
data->preproc_flags[0] = NULL; data->preproc_flags[0] = NULL;
data->comp_flags = (char **) malloc(sizeof(char*)); data->comp_flags = (char **) malloc(sizeof(char*));
data->comp_flags[0] = NULL; data->comp_flags[0] = NULL;
data->comp_flags_prefix = (char **) malloc(sizeof(char*));
data->comp_flags_prefix[0] = NULL;
data->link_flags = (char **) malloc(sizeof(char*)); data->link_flags = (char **) malloc(sizeof(char*));
data->link_flags[0] = NULL; data->link_flags[0] = NULL;
data->libs = (char **) malloc(sizeof(char*)); data->libs = (char **) malloc(sizeof(char*));
@ -142,6 +146,7 @@ options_data_free(struct options_data_t *data)
if (NULL != data->module_option) free(data->module_option); if (NULL != data->module_option) free(data->module_option);
opal_argv_free(data->preproc_flags); opal_argv_free(data->preproc_flags);
opal_argv_free(data->comp_flags); opal_argv_free(data->comp_flags);
opal_argv_free(data->comp_flags_prefix);
opal_argv_free(data->link_flags); opal_argv_free(data->link_flags);
opal_argv_free(data->libs); opal_argv_free(data->libs);
if (NULL != data->req_file) free(data->req_file); if (NULL != data->req_file) free(data->req_file);
@ -298,6 +303,13 @@ data_callback(const char *key, const char *value)
values); values);
expand_flags(options_data[parse_options_idx].comp_flags); expand_flags(options_data[parse_options_idx].comp_flags);
opal_argv_free(values); opal_argv_free(values);
} else if (0 == strcmp(key, "compiler_flags_prefix")) {
char **values = opal_argv_split(value, ' ');
opal_argv_insert(&options_data[parse_options_idx].comp_flags_prefix,
opal_argv_count(options_data[parse_options_idx].comp_flags_prefix),
values);
expand_flags(options_data[parse_options_idx].comp_flags_prefix);
opal_argv_free(values);
} else if (0 == strcmp(key, "linker_flags")) { } else if (0 == strcmp(key, "linker_flags")) {
char **values = opal_argv_split(value, ' '); char **values = opal_argv_split(value, ' ');
opal_argv_insert(&options_data[parse_options_idx].link_flags, opal_argv_insert(&options_data[parse_options_idx].link_flags,
@ -712,6 +724,12 @@ main(int argc, char *argv[])
exec_argc = 0; exec_argc = 0;
} }
if (flags & COMP_WANT_COMPILE) {
opal_argv_insert(&exec_argv, exec_argc,
options_data[user_data_idx].comp_flags_prefix);
exec_argc = opal_argv_count(exec_argv);
}
/* Per https://svn.open-mpi.org/trac/ompi/ticket/2201, add all the /* Per https://svn.open-mpi.org/trac/ompi/ticket/2201, add all the
user arguments before anything else. */ user arguments before anything else. */
opal_argv_insert(&exec_argv, exec_argc, user_argv); opal_argv_insert(&exec_argv, exec_argc, user_argv);

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

@ -14,6 +14,7 @@ compiler_flags_env=CXXFLAGS
compiler=@CXX@ compiler=@CXX@
extra_includes=@OPAL_WRAPPER_EXTRA_INCLUDES@ extra_includes=@OPAL_WRAPPER_EXTRA_INCLUDES@
preprocessor_flags=@OPAL_WRAPPER_EXTRA_CPPFLAGS@ preprocessor_flags=@OPAL_WRAPPER_EXTRA_CPPFLAGS@
compiler_flags_prefix=@OPAL_WRAPPER_EXTRA_CXXFLAGS_PREFIX@
compiler_flags=@OPAL_WRAPPER_EXTRA_CXXFLAGS@ compiler_flags=@OPAL_WRAPPER_EXTRA_CXXFLAGS@
linker_flags=@OPAL_WRAPPER_EXTRA_LDFLAGS@ linker_flags=@OPAL_WRAPPER_EXTRA_LDFLAGS@
libs=-lopen-pal @OPAL_WRAPPER_EXTRA_LIBS@ libs=-lopen-pal @OPAL_WRAPPER_EXTRA_LIBS@

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

@ -14,6 +14,7 @@ compiler_flags_env=CFLAGS
compiler=@CC@ compiler=@CC@
extra_includes=@OPAL_WRAPPER_EXTRA_INCLUDES@ extra_includes=@OPAL_WRAPPER_EXTRA_INCLUDES@
preprocessor_flags=@OPAL_WRAPPER_EXTRA_CPPFLAGS@ preprocessor_flags=@OPAL_WRAPPER_EXTRA_CPPFLAGS@
compiler_flags_prefix=@OPAL_WRAPPER_EXTRA_CFLAGS_PREFIX@
compiler_flags=@OPAL_WRAPPER_EXTRA_CFLAGS@ compiler_flags=@OPAL_WRAPPER_EXTRA_CFLAGS@
linker_flags=@OPAL_WRAPPER_EXTRA_LDFLAGS@ linker_flags=@OPAL_WRAPPER_EXTRA_LDFLAGS@
libs=-lopen-pal @OPAL_WRAPPER_EXTRA_LIBS@ libs=-lopen-pal @OPAL_WRAPPER_EXTRA_LIBS@

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

@ -34,11 +34,21 @@ AC_DEFUN([ORTE_SETUP_WRAPPER_FINAL],[
AC_SUBST([ORTE_WRAPPER_EXTRA_CXXFLAGS]) AC_SUBST([ORTE_WRAPPER_EXTRA_CXXFLAGS])
AC_MSG_RESULT([$ORTE_WRAPPER_EXTRA_CXXFLAGS]) AC_MSG_RESULT([$ORTE_WRAPPER_EXTRA_CXXFLAGS])
AC_MSG_CHECKING([for ORTE CXXFLAGS_PREFIX])
ORTE_WRAPPER_EXTRA_CXXFLAGS_PREFIX="$WRAPPER_EXTRA_CXXFLAGS_PREFIX"
AC_SUBST([ORTE_WRAPPER_EXTRA_CXXFLAGS_PREFIX])
AC_MSG_RESULT([$ORTE_WRAPPER_EXTRA_CXXFLAGS_PREFIX])
AC_MSG_CHECKING([for ORTE CFLAGS]) AC_MSG_CHECKING([for ORTE CFLAGS])
ORTE_WRAPPER_EXTRA_CFLAGS="$WRAPPER_EXTRA_CFLAGS" ORTE_WRAPPER_EXTRA_CFLAGS="$WRAPPER_EXTRA_CFLAGS"
AC_SUBST([ORTE_WRAPPER_EXTRA_CFLAGS]) AC_SUBST([ORTE_WRAPPER_EXTRA_CFLAGS])
AC_MSG_RESULT([$ORTE_WRAPPER_EXTRA_CFLAGS]) AC_MSG_RESULT([$ORTE_WRAPPER_EXTRA_CFLAGS])
AC_MSG_CHECKING([for ORTE CFLAGS_PREFIX])
ORTE_WRAPPER_EXTRA_CFLAGS_PREFIX="$WRAPPER_EXTRA_CFLAGS_PREFIX"
AC_SUBST([ORTE_WRAPPER_EXTRA_CFLAGS_PREFIX])
AC_MSG_RESULT([$ORTE_WRAPPER_EXTRA_CFLAGS_PREFIX])
AC_MSG_CHECKING([for ORTE LDFLAGS]) AC_MSG_CHECKING([for ORTE LDFLAGS])
ORTE_WRAPPER_EXTRA_LDFLAGS="$orte_WRAPPER_EXTRA_LDFLAGS $WRAPPER_EXTRA_LDFLAGS" ORTE_WRAPPER_EXTRA_LDFLAGS="$orte_WRAPPER_EXTRA_LDFLAGS $WRAPPER_EXTRA_LDFLAGS"
AC_SUBST([ORTE_WRAPPER_EXTRA_LDFLAGS]) AC_SUBST([ORTE_WRAPPER_EXTRA_LDFLAGS])

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

@ -2,6 +2,7 @@
# -*- perl -*- # -*- perl -*-
# #
# Copyright (c) 2009-2010 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2009-2010 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved.
# $COPYRIGHT$ # $COPYRIGHT$
# #
# Additional copyrights may follow # Additional copyrights may follow
@ -30,7 +31,9 @@ my $CXX = "@CXX@";
my $extra_includes = "@ORTE_WRAPPER_EXTRA_INCLUDES@"; my $extra_includes = "@ORTE_WRAPPER_EXTRA_INCLUDES@";
my $extra_cppflags = "@ORTE_WRAPPER_EXTRA_CPPFLAGS@"; my $extra_cppflags = "@ORTE_WRAPPER_EXTRA_CPPFLAGS@";
my $extra_cflags = "@ORTE_WRAPPER_EXTRA_CFLAGS@"; my $extra_cflags = "@ORTE_WRAPPER_EXTRA_CFLAGS@";
my $extra_cflags_prefix = "@ORTE_WRAPPER_EXTRA_CFLAGS_PREFIX@";
my $extra_cxxflags = "@ORTE_WRAPPER_EXTRA_CXXFLAGS@"; my $extra_cxxflags = "@ORTE_WRAPPER_EXTRA_CXXFLAGS@";
my $extra_cxxflags_prefix = "@ORTE_WRAPPER_EXTRA_CXXFLAGS_PREFIX@";
my $extra_ldflags = "@ORTE_WRAPPER_EXTRA_LDFLAGS@"; my $extra_ldflags = "@ORTE_WRAPPER_EXTRA_LDFLAGS@";
my $extra_libs = "@ORTE_WRAPPER_EXTRA_LIBS@"; my $extra_libs = "@ORTE_WRAPPER_EXTRA_LIBS@";
#my $cxx_lib = "@ORTE_WRAPPER_CXX_LIB@"; #my $cxx_lib = "@ORTE_WRAPPER_CXX_LIB@";
@ -43,6 +46,7 @@ my $lang = "none";
my $comp = ""; # this is a sentinal from configure my $comp = ""; # this is a sentinal from configure
my $preproc_flags = $include_flag . $includedir; my $preproc_flags = $include_flag . $includedir;
my $comp_flags = ""; my $comp_flags = "";
my $comp_flags_prefix = "";
my $linker_flags = $libdir_flag . $libdir . " " . $extra_ldflags; my $linker_flags = $libdir_flag . $libdir . " " . $extra_ldflags;
my $libs = "-lopen-rte -lopen-pal " . $extra_libs; my $libs = "-lopen-rte -lopen-pal " . $extra_libs;
@ -78,12 +82,14 @@ if (basename($0) eq "ortecc") {
$comp = check_env("CC", $CC); $comp = check_env("CC", $CC);
$preproc_flags .= " " . add_extra_includes(); $preproc_flags .= " " . add_extra_includes();
$comp_flags = $extra_cflags; $comp_flags = $extra_cflags;
$comp_flags_prefix = $extra_cflags_prefix;
# no special libs for C # no special libs for C
} elsif (basename($0) eq "ortec++") { } elsif (basename($0) eq "ortec++") {
$lang = "C++"; $lang = "C++";
$comp = check_env("CXX", $CXX); $comp = check_env("CXX", $CXX);
$preproc_flags .= " " . add_extra_includes(); $preproc_flags .= " " . add_extra_includes();
$comp_flags = $extra_cxxflags; $comp_flags = $extra_cxxflags;
$comp_flags_prefix = $extra_cxxflags_prefix;
# $libs = $cxx_lib . " " . $libs; # $libs = $cxx_lib . " " . $libs;
} }
@ -142,8 +148,12 @@ my @exec_argv = ();
# assemble command # assemble command
push(@exec_argv, split(' ', $comp)); push(@exec_argv, split(' ', $comp));
# Per https://svn.open-mpi.org/trac/ompi/ticket/2201, add all the user # Per tickets https://svn.open-mpi.org/trac/ompi/ticket/2474, and
# arguments before anything else. # https://svn.open-mpi.org/trac/ompi/ticket/2201, construct command
# with some system arguments before user arguments and some after.
if ($want_compile == 1) {
push(@exec_argv, split(' ', $comp_flags_prefix));
}
push(@exec_argv, @appargs); push(@exec_argv, @appargs);
if ($want_preproc == 1) { if ($want_preproc == 1) {
push(@exec_argv, split(' ', $preproc_flags)); push(@exec_argv, split(' ', $preproc_flags));

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

@ -14,6 +14,7 @@ compiler_flags_env=CXXFLAGS
compiler=@CXX@ compiler=@CXX@
extra_includes=@ORTE_WRAPPER_EXTRA_INCLUDES@ extra_includes=@ORTE_WRAPPER_EXTRA_INCLUDES@
preprocessor_flags=@ORTE_WRAPPER_EXTRA_CPPFLAGS@ preprocessor_flags=@ORTE_WRAPPER_EXTRA_CPPFLAGS@
compiler_flags_prefix=@ORTE_WRAPPER_EXTRA_CXXFLAGS_PREFIX@
compiler_flags=@ORTE_WRAPPER_EXTRA_CXXFLAGS@ compiler_flags=@ORTE_WRAPPER_EXTRA_CXXFLAGS@
linker_flags=@ORTE_WRAPPER_EXTRA_LDFLAGS@ linker_flags=@ORTE_WRAPPER_EXTRA_LDFLAGS@
libs=-lopen-rte @ORTE_WRAPPER_EXTRA_LIBS@ libs=-lopen-rte @ORTE_WRAPPER_EXTRA_LIBS@

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

@ -14,6 +14,7 @@ compiler_flags_env=CFLAGS
compiler=@CC@ compiler=@CC@
extra_includes=@ORTE_WRAPPER_EXTRA_INCLUDES@ extra_includes=@ORTE_WRAPPER_EXTRA_INCLUDES@
preprocessor_flags=@ORTE_WRAPPER_EXTRA_CPPFLAGS@ preprocessor_flags=@ORTE_WRAPPER_EXTRA_CPPFLAGS@
compiler_flags_prefix=@ORTE_WRAPPER_EXTRA_CFLAGS_PREFIX@
compiler_flags=@ORTE_WRAPPER_EXTRA_CFLAGS@ compiler_flags=@ORTE_WRAPPER_EXTRA_CFLAGS@
linker_flags=@ORTE_WRAPPER_EXTRA_LDFLAGS@ linker_flags=@ORTE_WRAPPER_EXTRA_LDFLAGS@
libs=-lopen-rte @ORTE_WRAPPER_EXTRA_LIBS@ libs=-lopen-rte @ORTE_WRAPPER_EXTRA_LIBS@