[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.2b2-22-gd141327

Service Account noreply at mpich.org
Wed Apr 29 11:23:42 CDT 2015


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".

The branch, master has been updated
       via  d14132727ec37ec61bb22cc1f7f80fd8bf41e447 (commit)
       via  90100837742c4c8700cc919e9b3234f957e48666 (commit)
       via  4d93cefa8f2fb06fdc47d8f73ed46c3623b8dfd6 (commit)
      from  9fee068ca22d54d4c0b6d205f6214cfdb4174e14 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/d14132727ec37ec61bb22cc1f7f80fd8bf41e447

commit d14132727ec37ec61bb22cc1f7f80fd8bf41e447
Author: Pavan Balaji <balaji at anl.gov>
Date:   Sat Apr 25 19:15:48 2015 -0500

    Added support for static compilation.
    
    If the user passes the -static flag, we disable interlibrary
    dependencies, since the linker would pick the static versions of the
    libraries in that case.
    
    We are still making an assumption that the default mode of the linker
    is shared, and the user can specify static library builds with
    -static.  However, this is not always true.  On BG/Q, for example, the
    default is static.
    
    Fixes #2190.
    
    Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>

diff --git a/src/env/mpicc.bash.in b/src/env/mpicc.bash.in
index 6d0cb7f..a817989 100644
--- a/src/env/mpicc.bash.in
+++ b/src/env/mpicc.bash.in
@@ -86,6 +86,7 @@ fi
 linking=yes
 allargs=("$@")
 argno=0
+interlib_deps=yes
 for arg in "$@" ; do
     # Set addarg to no if this arg should be ignored by the C compiler
     addarg=yes
@@ -99,6 +100,9 @@ for arg in "$@" ; do
 	# ----------------------------------------------------------------
 	# Options that control how we use mpicc (e.g., -show, 
 	# -cc=* -config=*
+    -static)
+    interlib_deps=no
+    ;;
     -echo)
     addarg=no
     set -x
@@ -208,7 +212,7 @@ final_cflags="@MPICH_MPICC_CFLAGS@ @WRAPPER_CFLAGS@"
 final_cppflags="@MPICH_MPICC_CPPFLAGS@ @WRAPPER_CPPFLAGS@"
 final_ldflags="@MPICH_MPICC_LDFLAGS@"
 final_libs="@MPICH_MPICC_LIBS@"
-if test "@INTERLIB_DEPS@" = "no" ; then
+if test "@INTERLIB_DEPS@" = "no" -o "${interlib_deps}" = "no" ; then
     final_ldflags="$ldflags @LDFLAGS@ @WRAPPER_LDFLAGS@"
     final_libs="$libs @LIBS@ @WRAPPER_LIBS@"
 fi
diff --git a/src/env/mpicc.sh.in b/src/env/mpicc.sh.in
index a4886ee..7b88647 100644
--- a/src/env/mpicc.sh.in
+++ b/src/env/mpicc.sh.in
@@ -85,6 +85,7 @@ fi
 
 linking=yes
 allargs=""
+interlib_deps=yes
 for arg in "$@" ; do
     # Set addarg to no if this arg should be ignored by the C compiler
     addarg=yes
@@ -99,6 +100,9 @@ for arg in "$@" ; do
 	# ----------------------------------------------------------------
 	# Options that control how we use mpicc (e.g., -show, 
 	# -cc=* -config=*
+    -static)
+    interlib_deps=no
+    ;;
     -echo)
     addarg=no
     set -x
@@ -217,7 +221,7 @@ final_cflags="@MPICH_MPICC_CFLAGS@ @WRAPPER_CFLAGS@"
 final_cppflags="@MPICH_MPICC_CPPFLAGS@ @WRAPPER_CPPFLAGS@"
 final_ldflags="@MPICH_MPICC_LDFLAGS@"
 final_libs="@MPICH_MPICC_LIBS@"
-if test "@INTERLIB_DEPS@" = "no" ; then
+if test "@INTERLIB_DEPS@" = "no" -o "${interlib_deps}" = "no" ; then
     final_ldflags="$ldflags @LDFLAGS@ @WRAPPER_LDFLAGS@"
     final_libs="$libs @LIBS@ @WRAPPER_LIBS@"
 fi
diff --git a/src/env/mpicxx.bash.in b/src/env/mpicxx.bash.in
index 8bf93cd..865fc7f 100644
--- a/src/env/mpicxx.bash.in
+++ b/src/env/mpicxx.bash.in
@@ -83,6 +83,7 @@ fi
 linking=yes
 allargs=("$@")
 argno=0
+interlib_deps=yes
 for arg in "$@" ; do
     # Set addarg to no if this arg should be ignored by the C compiler
     addarg=yes
@@ -96,6 +97,9 @@ for arg in "$@" ; do
 	# ----------------------------------------------------------------
 	# Options that control how we use mpicxx (e.g., -show, 
 	# -cxx=* -config=*
+    -static)
+    interlib_deps=no
+    ;;
     -echo)
     addarg=no
     set -x
@@ -214,7 +218,7 @@ final_cxxflags="@MPICH_MPICXX_CXXFLAGS@ @WRAPPER_CXXFLAGS@"
 final_cppflags="@MPICH_MPICXX_CPPFLAGS@ @WRAPPER_CPPFLAGS@"
 final_ldflags="@MPICH_MPICXX_LDFLAGS@"
 final_libs="@MPICH_MPICXX_LIBS@"
-if test "@INTERLIB_DEPS@" = "no" ; then
+if test "@INTERLIB_DEPS@" = "no" -o "${interlib_deps}" = "no" ; then
     final_ldflags="$ldflags @LDFLAGS@ @WRAPPER_LDFLAGS@"
     final_libs="$libs @LIBS@ @WRAPPER_LIBS@"
 fi
diff --git a/src/env/mpicxx.sh.in b/src/env/mpicxx.sh.in
index 41cc21a..d3dff0f 100644
--- a/src/env/mpicxx.sh.in
+++ b/src/env/mpicxx.sh.in
@@ -82,6 +82,7 @@ fi
 
 linking=yes
 allargs=""
+interlib_deps=yes
 for arg in "$@" ; do
     # Set addarg to no if this arg should be ignored by the C compiler
     addarg=yes
@@ -96,6 +97,9 @@ for arg in "$@" ; do
 	# ----------------------------------------------------------------
 	# Options that control how we use mpicxx (e.g., -show, 
 	# -cxx=* -config=*
+    -static)
+    interlib_deps=no
+    ;;
     -echo)
     addarg=no
     set -x
@@ -223,7 +227,7 @@ final_cxxflags="@MPICH_MPICXX_CXXFLAGS@ @WRAPPER_CXXFLAGS@"
 final_cppflags="@MPICH_MPICXX_CPPFLAGS@ @WRAPPER_CPPFLAGS@"
 final_ldflags="@MPICH_MPICXX_LDFLAGS@"
 final_libs="@MPICH_MPICXX_LIBS@"
-if test "@INTERLIB_DEPS@" = "no" ; then
+if test "@INTERLIB_DEPS@" = "no" -o "${interlib_deps}" = "no" ; then
     final_ldflags="$ldflags @LDFLAGS@ @WRAPPER_LDFLAGS@"
     final_libs="$libs @LIBS@ @WRAPPER_LIBS@"
 fi
diff --git a/src/env/mpif77.bash.in b/src/env/mpif77.bash.in
index e9d63cd..d3a9e95 100644
--- a/src/env/mpif77.bash.in
+++ b/src/env/mpif77.bash.in
@@ -90,6 +90,7 @@ linking=yes
 allargs=("$@")
 argno=0
 cppflags=()
+interlib_deps=yes
 for arg in "$@" ; do
     # Set addarg to no if this arg should be ignored by the C compiler
     addarg=yes
@@ -103,6 +104,9 @@ for arg in "$@" ; do
 	# ----------------------------------------------------------------
 	# Options that control how we use mpif77 (e.g., -show, 
 	# -f77=* -config=*
+    -static)
+    interlib_deps=no
+    ;;
     -echo)
     addarg=no
     set -x
@@ -265,7 +269,7 @@ fi
 final_fflags="@MPICH_MPIF77_FFLAGS@ @WRAPPER_FFLAGS@"
 final_ldflags="@MPICH_MPIF77_LDFLAGS@"
 final_libs="@MPICH_MPIF77_LIBS@"
-if test "@INTERLIB_DEPS@" = "no" ; then
+if test "@INTERLIB_DEPS@" = "no" -o "${interlib_deps}" = "no" ; then
     final_ldflags="$ldflags @LDFLAGS@ @WRAPPER_LDFLAGS@"
     final_libs="$libs @LIBS@ @WRAPPER_LIBS@"
 fi
diff --git a/src/env/mpif77.sh.in b/src/env/mpif77.sh.in
index 6b9edf2..7e347bc 100644
--- a/src/env/mpif77.sh.in
+++ b/src/env/mpif77.sh.in
@@ -88,6 +88,7 @@ fi
 
 linking=yes
 allargs=""
+interlib_deps=yes
 for arg in "$@" ; do
     # Set addarg to no if this arg should be ignored by the C compiler
     addarg=yes
@@ -102,6 +103,9 @@ for arg in "$@" ; do
 	# ----------------------------------------------------------------
 	# Options that control how we use mpif77 (e.g., -show, 
 	# -f77=* -config=*
+    -static)
+    interlib_deps=no
+    ;;
     -echo)
     addarg=no
     set -x
@@ -287,7 +291,7 @@ fi
 final_fflags="@MPICH_MPIF77_FFLAGS@ @WRAPPER_FFLAGS@"
 final_ldflags="@MPICH_MPIF77_LDFLAGS@"
 final_libs="@MPICH_MPIF77_LIBS@"
-if test "@INTERLIB_DEPS@" = "no" ; then
+if test "@INTERLIB_DEPS@" = "no" -o "${interlib_deps}" = "no" ; then
     final_ldflags="$ldflags @LDFLAGS@ @WRAPPER_LDFLAGS@"
     final_libs="$libs @LIBS@ @WRAPPER_LIBS@"
 fi
diff --git a/src/env/mpifort.bash.in b/src/env/mpifort.bash.in
index 89ccf36..af006ee 100644
--- a/src/env/mpifort.bash.in
+++ b/src/env/mpifort.bash.in
@@ -103,6 +103,7 @@ linking=yes
 allargs=("$@")
 argno=0
 cppflags=()
+interlib_deps=yes
 for arg in "$@" ; do
     # Set addarg to no if this arg should be ignored by the C compiler
     addarg=yes
@@ -116,6 +117,9 @@ for arg in "$@" ; do
 	# ----------------------------------------------------------------
 	# Options that control how we use mpifort (e.g., -show,
 	# -fc=* -config=*
+    -static)
+    interlib_deps=no
+    ;;
     -echo)
     addarg=no
     set -x
@@ -306,7 +310,7 @@ fi
 final_fcflags="@MPICH_MPIFORT_FCFLAGS@ @WRAPPER_FCFLAGS@"
 final_ldflags="@MPICH_MPIFORT_LDFLAGS@"
 final_libs="@MPICH_MPIFORT_LIBS@"
-if test "@INTERLIB_DEPS@" = "no" ; then
+if test "@INTERLIB_DEPS@" = "no" -o "${interlib_deps}" = "no" ; then
     final_ldflags="$ldflags @LDFLAGS@ @WRAPPER_LDFLAGS@"
     final_libs="$libs @LIBS@ @WRAPPER_LIBS@"
 fi
diff --git a/src/env/mpifort.sh.in b/src/env/mpifort.sh.in
index 3f89f8b..0cf8e8e 100644
--- a/src/env/mpifort.sh.in
+++ b/src/env/mpifort.sh.in
@@ -101,6 +101,7 @@ fi
 #
 linking=yes
 allargs=""
+interlib_deps=yes
 for arg in "$@" ; do
     # Set addarg to no if this arg should be ignored by the C compiler
     addarg=yes
@@ -115,6 +116,9 @@ for arg in "$@" ; do
 	# ----------------------------------------------------------------
 	# Options that control how we use mpifort (e.g., -show,
 	# -fc=* -config=*
+    -static)
+    interlib_deps=no
+    ;;
     -echo)
     addarg=no
     set -x
@@ -323,7 +327,7 @@ fi
 final_fcflags="@MPICH_MPIFORT_FCFLAGS@ @WRAPPER_FCFLAGS@"
 final_ldflags="@MPICH_MPIFORT_LDFLAGS@"
 final_libs="@MPICH_MPIFORT_LIBS@"
-if test "@INTERLIB_DEPS@" = "no" ; then
+if test "@INTERLIB_DEPS@" = "no" -o "${interlib_deps}" = "no" ; then
     final_ldflags="$ldflags @LDFLAGS@ @WRAPPER_LDFLAGS@"
     final_libs="$libs @LIBS@ @WRAPPER_LIBS@"
 fi

http://git.mpich.org/mpich.git/commitdiff/90100837742c4c8700cc919e9b3234f957e48666

commit 90100837742c4c8700cc919e9b3234f957e48666
Author: Pavan Balaji <balaji at anl.gov>
Date:   Sat Apr 25 15:47:41 2015 -0500

    Cleaned up the management of wrapper flags in MPICH.
    
    This includes several changes:
    
    1. Merged WRAPPER and EXTERNAL LIBS.  There is no reason to maintain
    two names for these flags.  These are eventually appended and added to
    the compiler wrappers anyway.
    
    2. Updated mpicc and friend to add the necessary flags directly
    instead of trying to merge these flags in configure.
    
    Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>

diff --git a/Makefile.am b/Makefile.am
index 463bfe4..e1c7077 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -49,7 +49,7 @@ errnames_txt_files =
 
 external_subdirs = @mplsrcdir@ @opasrcdir@
 external_ldflags = @mpllibdir@ @opalibdir@
-external_libs = @EXTERNAL_LIBS@
+external_libs = @WRAPPER_LIBS@
 mpi_convenience_libs =
 pmpi_convenience_libs = @mpllib@ @opalib@
 
diff --git a/README.vin b/README.vin
index d9dcfb6..61c147a 100644
--- a/README.vin
+++ b/README.vin
@@ -297,11 +297,11 @@ them. This is a temporary hack for certain cases that advanced
 developers might be interested in, but which break existing configure
 tests (e.g., -Werror). These are NOT recommended for regular users.
 
-(d) MPICH_MPICC_FLAGS, MPICH_MPICPP_FLAGS, MPICH_MPICXX_FLAGS,
-MPICH_MPIFC_FLAGS, MPICH_LDFLAGS and MPICH_LIBS (abbreviated as
-MPICH_MPIX_FLAGS): These flags do *not* affect the compilation of the
-MPICH library itself, but will be internally used by mpicc and
-friends.
+(d) MPICH_MPICC_CFLAGS, MPICH_MPICC_CPPFLAGS, MPICH_MPICC_LDFLAGS,
+MPICH_MPICC_LIBS, and so on for MPICXX, MPIF77 and MPIFORT
+(abbreviated as MPICH_MPIX_FLAGS): These flags do *not* affect the
+compilation of the MPICH library itself, but will be internally used
+by mpicc and friends.
 
 
   +--------------------------------------------------------------------+
diff --git a/configure.ac b/configure.ac
index a576e09..54b2910 100644
--- a/configure.ac
+++ b/configure.ac
@@ -269,21 +269,39 @@ PAC_PREFIX_ALL_FLAGS(USER)
 # as include paths).
 #
 # All libraries that are detected by MPICH as needed for some of its
-# functionality (such as -lpthread) should be added to EXTERNAL_LIBS
+# functionality (such as -lpthread) should be added to WRAPPER_LIBS
 # so executables built within MPICH use them.  If inter-library
 # dependencies are not supported on the platform, these libraries are
 # added to the MPICH wrappers (mpicc and friends) as well.
-PAC_PREFIX_ALL_FLAGS(WRAPPER)
-WRAPPER_CFLAGS="$CFLAGS $MPICH_MPICC_FLAGS"
-WRAPPER_CPPFLAGS="$CPPFLAGS $MPICH_MPICPP_FLAGS"
-WRAPPER_CXXFLAGS="$CXXFLAGS $MPICH_MPICXX_FLAGS"
-WRAPPER_FFLAGS="$FFLAGS $MPICH_MPIF77_FLAGS"
-WRAPPER_FCFLAGS="$FCFLAGS $MPICH_MPIFC_FLAGS"
-WRAPPER_LDFLAGS="$MPICH_LDFLAGS"
-WRAPPER_LIBS="$MPICH_LIBS"
-EXTERNAL_LIBS=""
-export EXTERNAL_LIBS
-AC_SUBST(EXTERNAL_LIBS)
+AC_SUBST(WRAPPER_CFLAGS)
+AC_SUBST(WRAPPER_CPPFLAGS)
+AC_SUBST(WRAPPER_CXXFLAGS)
+AC_SUBST(WRAPPER_FFLAGS)
+AC_SUBST(WRAPPER_FCFLAGS)
+AC_SUBST(WRAPPER_LDFLAGS)
+AC_SUBST(WRAPPER_LIBS)
+
+# MPICH_MPIx_FLAGS are used by mpicc and friends.  They are like
+# WRAPPER flags, but these are provided by the user.
+AC_SUBST(MPICH_MPICC_CPPFLAGS)
+AC_SUBST(MPICH_MPICC_CFLAGS)
+AC_SUBST(MPICH_MPICC_LDFLAGS)
+AC_SUBST(MPICH_MPICC_LIBS)
+
+AC_SUBST(MPICH_MPICXX_CPPFLAGS)
+AC_SUBST(MPICH_MPICXX_CXXFLAGS)
+AC_SUBST(MPICH_MPICXX_LDFLAGS)
+AC_SUBST(MPICH_MPICXX_LIBS)
+
+AC_SUBST(MPICH_MPIF77_CPPFLAGS)
+AC_SUBST(MPICH_MPIF77_FFLAGS)
+AC_SUBST(MPICH_MPIF77_LDFLAGS)
+AC_SUBST(MPICH_MPIF77_LIBS)
+
+AC_SUBST(MPICH_MPIFORT_CPPFLAGS)
+AC_SUBST(MPICH_MPIFORT_FCFLAGS)
+AC_SUBST(MPICH_MPIFORT_LDFLAGS)
+AC_SUBST(MPICH_MPIFORT_LIBS)
 
 # Add MPICHLIB_* to the appropriate flags
 AC_ARG_VAR(MPICHLIB_CFLAGS,
@@ -1171,7 +1189,7 @@ else
     AS_IF([test -s "${with_mpl_prefix}/include/mplconfig.h"],
           [:],[AC_MSG_ERROR([the MPL installation in "${with_mpl_prefix}" appears broken])])
     PAC_APPEND_FLAG([-I${with_mpl_prefix}/include],[CPPFLAGS])
-    PAC_PREPEND_FLAG([-l${MPLLIBNAME}],[EXTERNAL_LIBS])
+    PAC_PREPEND_FLAG([-l${MPLLIBNAME}],[WRAPPER_LIBS])
     PAC_APPEND_FLAG([-L${with_mpl_prefix}/lib],[WRAPPER_LDFLAGS])
     mpllibdir="-L${with_mpl_prefix}/lib"
 fi
@@ -1235,7 +1253,7 @@ if test "$with_openpa_prefix" = "embedded" ; then
         AC_MSG_WARN([Attempted to use the embedded OpenPA source tree in "src/openpa", but it is missing.  Configuration or compilation may fail later.])
     fi
 elif test "$with_openpa_prefix" = "system" ; then
-    PAC_PREPEND_FLAG([-l${OPALIBNAME}],[EXTERNAL_LIBS])
+    PAC_PREPEND_FLAG([-l${OPALIBNAME}],[WRAPPER_LIBS])
 elif test "$with_openpa_prefix" = "no" ; then
     # The user doesn't want to use OPA.  This may or may not cause MPICH to
     # fail to configure/build, depending on many other factors.
@@ -1246,7 +1264,7 @@ else
     AS_IF([test -s "${with_openpa_prefix}/include/opa_primitives.h" -a -s "${with_openpa_prefix}/include/opa_config.h"],
           [:],[AC_MSG_ERROR([the OpenPA installation in "${with_openpa_prefix}" appears broken])])
     PAC_APPEND_FLAG([-I${with_openpa_prefix}/include],[CPPFLAGS])
-    PAC_PREPEND_FLAG([-l${OPALIBNAME}],[EXTERNAL_LIBS])
+    PAC_PREPEND_FLAG([-l${OPALIBNAME}],[WRAPPER_LIBS])
     if test -d ${with_openpa_prefix}/lib64 ; then
         PAC_APPEND_FLAG([-L${with_openpa_prefix}/lib64],[WRAPPER_LDFLAGS])
         opalibdir="-L${with_openpa_prefix}/lib64"
@@ -5331,7 +5349,6 @@ case $with_thread_package in
         AC_CHECK_LIB([pthread],[pthread_key_create],have_pthreads=yes)
 	if test "$have_pthreads" = "yes" ; then
 	   PAC_PREPEND_FLAG([-lpthread],[LIBS])
-	   PAC_PREPEND_FLAG([-lpthread],[EXTERNAL_LIBS])
 	fi
 
         AC_CHECK_FUNCS(pthread_yield)
@@ -5555,7 +5572,7 @@ AC_ARG_ENABLE(checkpointing,
         PAC_SET_HEADER_LIB_PATH(blcr)
 	PAC_PUSH_FLAG([LIBS])
 	PAC_CHECK_HEADER_LIB_FATAL(blcr, libcr.h, cr, cr_init)
-	PAC_APPEND_FLAG([-lblcr],[EXTERNAL_LIBS])
+	PAC_APPEND_FLAG([-lblcr],[WRAPPER_LIBS])
 	PAC_POP_FLAG([LIBS])
         AC_DEFINE(ENABLE_CHECKPOINTING,1,[Application checkpointing enabled])
       fi ],
@@ -6021,13 +6038,6 @@ AC_OUTPUT_COMMANDS([chmod a+x test/commands/cmdtests])
 
 AC_DEFINE(HAVE_MPICHCONF,1,[Define so that we can test whether the mpichconf.h file has been included])
 
-# If the platform does not support inter-library dependencies,
-# add the LDFLAGS/LIBS we got so far to WRAPPERs
-if test "$INTERLIB_DEPS" = "no" ; then
-   WRAPPER_LDFLAGS="$WRAPPER_LDFLAGS $LDFLAGS"
-   WRAPPER_LIBS="$WRAPPER_LIBS $EXTERNAL_LIBS"
-fi
-
 if test "$USE_PMI2_API" = "yes" ; then
    AC_DEFINE(USE_PMI2_API, 1, [Define if PMI2 API must be used])
 fi
diff --git a/src/env/mpicc.bash.in b/src/env/mpicc.bash.in
index eaceecc..6d0cb7f 100644
--- a/src/env/mpicc.bash.in
+++ b/src/env/mpicc.bash.in
@@ -204,6 +204,15 @@ if [ -n "$profConf" ] ; then
     fi
 fi
 
+final_cflags="@MPICH_MPICC_CFLAGS@ @WRAPPER_CFLAGS@"
+final_cppflags="@MPICH_MPICC_CPPFLAGS@ @WRAPPER_CPPFLAGS@"
+final_ldflags="@MPICH_MPICC_LDFLAGS@"
+final_libs="@MPICH_MPICC_LIBS@"
+if test "@INTERLIB_DEPS@" = "no" ; then
+    final_ldflags="$ldflags @LDFLAGS@ @WRAPPER_LDFLAGS@"
+    final_libs="$libs @LIBS@ @WRAPPER_LIBS@"
+fi
+
 # -----------------------------------------------------------------------
 #
 # A temporary statement to invoke the compiler
@@ -229,14 +238,14 @@ if [ "$linking" = yes ] ; then
     fi
 
     if [ "$nativelinking" = yes ] ; then
-        $Show $CC @WRAPPER_CPPFLAGS@ $PROFILE_INCPATHS @WRAPPER_CFLAGS@ @WRAPPER_LDFLAGS@ "${allargs[@]}" -I$includedir
+        $Show $CC ${final_cppflags} $PROFILE_INCPATHS ${final_cflags} ${final_ldflags} "${allargs[@]}" -I$includedir
         rc=$?
     else
-        $Show $CC @WRAPPER_CPPFLAGS@ $PROFILE_INCPATHS @WRAPPER_CFLAGS@ @WRAPPER_LDFLAGS@ "${allargs[@]}" -I$includedir -L$libdir $PROFILE_PRELIB $PROFILE_FOO $rpath_flags -l at MPILIBNAME@ @LPMPILIBNAME@ $PROFILE_POSTLIB @WRAPPER_LIBS@
+        $Show $CC ${final_cppflags} $PROFILE_INCPATHS ${final_cflags} ${final_ldflags} "${allargs[@]}" -I$includedir -L$libdir $PROFILE_PRELIB $PROFILE_FOO $rpath_flags -l at MPILIBNAME@ @LPMPILIBNAME@ $PROFILE_POSTLIB ${final_libs}
         rc=$?
     fi
 else
-    $Show $CC @WRAPPER_CPPFLAGS@ $PROFILE_INCPATHS @WRAPPER_CFLAGS@ "${allargs[@]}" -I$includedir
+    $Show $CC ${final_cppflags} $PROFILE_INCPATHS ${final_cflags} "${allargs[@]}" -I$includedir
     rc=$?
 fi
 
diff --git a/src/env/mpicc.sh.in b/src/env/mpicc.sh.in
index 51bbfb4..a4886ee 100644
--- a/src/env/mpicc.sh.in
+++ b/src/env/mpicc.sh.in
@@ -213,6 +213,15 @@ if [ -n "$profConf" ] ; then
     fi
 fi
 
+final_cflags="@MPICH_MPICC_CFLAGS@ @WRAPPER_CFLAGS@"
+final_cppflags="@MPICH_MPICC_CPPFLAGS@ @WRAPPER_CPPFLAGS@"
+final_ldflags="@MPICH_MPICC_LDFLAGS@"
+final_libs="@MPICH_MPICC_LIBS@"
+if test "@INTERLIB_DEPS@" = "no" ; then
+    final_ldflags="$ldflags @LDFLAGS@ @WRAPPER_LDFLAGS@"
+    final_libs="$libs @LIBS@ @WRAPPER_LIBS@"
+fi
+
 # -----------------------------------------------------------------------
 #
 # A temporary statement to invoke the compiler
@@ -238,14 +247,14 @@ if [ "$linking" = yes ] ; then
     fi
 
     if [ "$nativelinking" = yes ] ; then
-        $Show $CC @WRAPPER_CPPFLAGS@ $PROFILE_INCPATHS @WRAPPER_CFLAGS@ @WRAPPER_LDFLAGS@ $allargs -I$includedir
+        $Show $CC ${final_cppflags} $PROFILE_INCPATHS ${final_cflags} ${final_ldflags} $allargs -I$includedir
         rc=$?
     else
-        $Show $CC @WRAPPER_CPPFLAGS@ $PROFILE_INCPATHS @WRAPPER_CFLAGS@ @WRAPPER_LDFLAGS@ $allargs -I$includedir -L$libdir $PROFILE_PRELIB $PROFILE_FOO $rpath_flags -l at MPILIBNAME@ @LPMPILIBNAME@ $PROFILE_POSTLIB @WRAPPER_LIBS@
+        $Show $CC ${final_cppflags} $PROFILE_INCPATHS ${final_cflags} ${final_ldflags} $allargs -I$includedir -L$libdir $PROFILE_PRELIB $PROFILE_FOO $rpath_flags -l at MPILIBNAME@ @LPMPILIBNAME@ $PROFILE_POSTLIB ${final_libs}
         rc=$?
     fi
 else
-    $Show $CC @WRAPPER_CPPFLAGS@ $PROFILE_INCPATHS @WRAPPER_CFLAGS@ $allargs -I$includedir
+    $Show $CC ${final_cppflags} $PROFILE_INCPATHS ${final_cflags} $allargs -I$includedir
     rc=$?
 fi
 
diff --git a/src/env/mpicxx.bash.in b/src/env/mpicxx.bash.in
index 25179dd..8bf93cd 100644
--- a/src/env/mpicxx.bash.in
+++ b/src/env/mpicxx.bash.in
@@ -210,6 +210,15 @@ if [ -n "$profConf" ] ; then
     fi
 fi
 
+final_cxxflags="@MPICH_MPICXX_CXXFLAGS@ @WRAPPER_CXXFLAGS@"
+final_cppflags="@MPICH_MPICXX_CPPFLAGS@ @WRAPPER_CPPFLAGS@"
+final_ldflags="@MPICH_MPICXX_LDFLAGS@"
+final_libs="@MPICH_MPICXX_LIBS@"
+if test "@INTERLIB_DEPS@" = "no" ; then
+    final_ldflags="$ldflags @LDFLAGS@ @WRAPPER_LDFLAGS@"
+    final_libs="$libs @LIBS@ @WRAPPER_LIBS@"
+fi
+
 # A temporary statement to invoke the compiler
 # Place the -L before any args incase there are any mpi libraries in there.
 # Eventually, we'll want to move this after any non-MPI implementation 
@@ -227,14 +236,14 @@ if [ "$linking" = yes ] ; then
     fi
 
     if [ "$nativelinking" = yes ] ; then
-        $Show $CXX $PROFILE_INCPATHS @WRAPPER_CXXFLAGS@ @WRAPPER_LDFLAGS@ "${allargs[@]}" -I$includedir
+        $Show $CXX ${final_cppflags} $PROFILE_INCPATHS ${final_cxxflags} ${final_ldflags} "${allargs[@]}" -I$includedir
         rc=$?
     else
-        $Show $CXX $PROFILE_INCPATHS @WRAPPER_CXXFLAGS@ @WRAPPER_LDFLAGS@ "${allargs[@]}" -I$includedir -L$libdir $cxxlibs $PROFILE_PRELIB $PROFILE_FOO $rpath_flags -l at MPILIBNAME@ @LPMPILIBNAME@ $PROFILE_POSTLIB @WRAPPER_LIBS@
+        $Show $CXX ${final_cppflags} $PROFILE_INCPATHS ${final_cxxflags} ${final_ldflags} "${allargs[@]}" -I$includedir -L$libdir $cxxlibs $PROFILE_PRELIB $PROFILE_FOO $rpath_flags -l at MPILIBNAME@ @LPMPILIBNAME@ $PROFILE_POSTLIB ${final_libs}
         rc=$?
     fi
 else
-    $Show $CXX $PROFILE_INCPATHS @WRAPPER_CXXFLAGS@ "${allargs[@]}" -I$includedir
+    $Show $CXX ${final_cppflags} $PROFILE_INCPATHS ${final_cxxflags} "${allargs[@]}" -I$includedir
     rc=$?
 fi
 
diff --git a/src/env/mpicxx.sh.in b/src/env/mpicxx.sh.in
index 36b9330..41cc21a 100644
--- a/src/env/mpicxx.sh.in
+++ b/src/env/mpicxx.sh.in
@@ -219,6 +219,15 @@ if [ -n "$profConf" ] ; then
     fi
 fi
 
+final_cxxflags="@MPICH_MPICXX_CXXFLAGS@ @WRAPPER_CXXFLAGS@"
+final_cppflags="@MPICH_MPICXX_CPPFLAGS@ @WRAPPER_CPPFLAGS@"
+final_ldflags="@MPICH_MPICXX_LDFLAGS@"
+final_libs="@MPICH_MPICXX_LIBS@"
+if test "@INTERLIB_DEPS@" = "no" ; then
+    final_ldflags="$ldflags @LDFLAGS@ @WRAPPER_LDFLAGS@"
+    final_libs="$libs @LIBS@ @WRAPPER_LIBS@"
+fi
+
 # A temporary statement to invoke the compiler
 # Place the -L before any args incase there are any mpi libraries in there.
 # Eventually, we'll want to move this after any non-MPI implementation 
@@ -236,14 +245,14 @@ if [ "$linking" = yes ] ; then
     fi
 
     if [ "$nativelinking" = yes ] ; then
-        $Show $CXX $PROFILE_INCPATHS @WRAPPER_CXXFLAGS@ @WRAPPER_LDFLAGS@ $allargs -I$includedir
+        $Show $CXX ${final_cppflags} $PROFILE_INCPATHS ${final_cxxflags} ${final_ldflags} $allargs -I$includedir
         rc=$?
     else
-        $Show $CXX $PROFILE_INCPATHS @WRAPPER_CXXFLAGS@ @WRAPPER_LDFLAGS@ $allargs -I$includedir -L$libdir $cxxlibs $PROFILE_PRELIB $PROFILE_FOO $rpath_flags -l at MPILIBNAME@ @LPMPILIBNAME@ $PROFILE_POSTLIB @WRAPPER_LIBS@
+        $Show $CXX ${final_cppflags} $PROFILE_INCPATHS ${final_cxxflags} ${final_ldflags} $allargs -I$includedir -L$libdir $cxxlibs $PROFILE_PRELIB $PROFILE_FOO $rpath_flags -l at MPILIBNAME@ @LPMPILIBNAME@ $PROFILE_POSTLIB ${final_libs}
         rc=$?
     fi
 else
-    $Show $CXX $PROFILE_INCPATHS @WRAPPER_CXXFLAGS@ $allargs -I$includedir
+    $Show $CXX ${final_cppflags} $PROFILE_INCPATHS ${final_cxxflags} $allargs -I$includedir
     rc=$?
 fi
 
diff --git a/src/env/mpif77.bash.in b/src/env/mpif77.bash.in
index 8d2a602..e9d63cd 100644
--- a/src/env/mpif77.bash.in
+++ b/src/env/mpif77.bash.in
@@ -262,6 +262,14 @@ if [ -n "$profConf" ] ; then
     fi
 fi
 
+final_fflags="@MPICH_MPIF77_FFLAGS@ @WRAPPER_FFLAGS@"
+final_ldflags="@MPICH_MPIF77_LDFLAGS@"
+final_libs="@MPICH_MPIF77_LIBS@"
+if test "@INTERLIB_DEPS@" = "no" ; then
+    final_ldflags="$ldflags @LDFLAGS@ @WRAPPER_LDFLAGS@"
+    final_libs="$libs @LIBS@ @WRAPPER_LIBS@"
+fi
+
 # A temporary statement to invoke the compiler
 # Place the -L before any args incase there are any mpi libraries in there.
 # Eventually, we'll want to move this after any non-MPI implementation 
@@ -280,14 +288,14 @@ if [ "$linking" = yes ] ; then
     fi
 
     if [ "$nativelinking" = yes ] ; then
-        $Show $F77 $PROFILE_INCPATHS @WRAPPER_FFLAGS@ @WRAPPER_LDFLAGS@ "${allargs[@]}" -I$includedir
+        $Show $F77 $PROFILE_INCPATHS ${final_fflags} ${final_ldflags} "${allargs[@]}" -I$includedir
         rc=$?
     else
-        $Show $F77 $PROFILE_INCPATHS @WRAPPER_FFLAGS@ @WRAPPER_LDFLAGS@ "${allargs[@]}" -I$includedir -L$libdir $f77libs $PROFILE_PRELIB $PROFILE_FOO $rpath_flags -l at MPILIBNAME@ @LPMPILIBNAME@ $PROFILE_POSTLIB @WRAPPER_LIBS@ @F77_OTHER_LIBS@
+        $Show $F77 $PROFILE_INCPATHS ${final_fflags} ${final_ldflags} "${allargs[@]}" -I$includedir -L$libdir $f77libs $PROFILE_PRELIB $PROFILE_FOO $rpath_flags -l at MPILIBNAME@ @LPMPILIBNAME@ $PROFILE_POSTLIB ${final_libs} @F77_OTHER_LIBS@
         rc=$?
     fi
 else
-    $Show $F77 $PROFILE_INCPATHS @WRAPPER_FFLAGS@ "${allargs[@]}" -I$includedir
+    $Show $F77 $PROFILE_INCPATHS ${final_fflags} "${allargs[@]}" -I$includedir
     rc=$?
 fi
 if [ -n "$rmfiles" ] ; then
diff --git a/src/env/mpif77.sh.in b/src/env/mpif77.sh.in
index 1fd760d..6b9edf2 100644
--- a/src/env/mpif77.sh.in
+++ b/src/env/mpif77.sh.in
@@ -284,6 +284,14 @@ if [ -n "$profConf" ] ; then
     fi
 fi
 
+final_fflags="@MPICH_MPIF77_FFLAGS@ @WRAPPER_FFLAGS@"
+final_ldflags="@MPICH_MPIF77_LDFLAGS@"
+final_libs="@MPICH_MPIF77_LIBS@"
+if test "@INTERLIB_DEPS@" = "no" ; then
+    final_ldflags="$ldflags @LDFLAGS@ @WRAPPER_LDFLAGS@"
+    final_libs="$libs @LIBS@ @WRAPPER_LIBS@"
+fi
+
 # A temporary statement to invoke the compiler
 # Place the -L before any args incase there are any mpi libraries in there.
 # Eventually, we'll want to move this after any non-MPI implementation 
@@ -302,14 +310,14 @@ if [ "$linking" = yes ] ; then
     fi
 
     if [ "$nativelinking" = yes ] ; then
-        $Show $F77 $PROFILE_INCPATHS @WRAPPER_FFLAGS@ @WRAPPER_LDFLAGS@ $allargs -I$includedir
+        $Show $F77 $PROFILE_INCPATHS ${final_fflags} ${final_ldflags} $allargs -I$includedir
         rc=$?
     else
-        $Show $F77 $PROFILE_INCPATHS @WRAPPER_FFLAGS@ @WRAPPER_LDFLAGS@ $allargs -I$includedir -L$libdir $f77libs $PROFILE_PRELIB $PROFILE_FOO $rpath_flags -l at MPILIBNAME@ @LPMPILIBNAME@ $PROFILE_POSTLIB @WRAPPER_LIBS@ @F77_OTHER_LIBS@
+        $Show $F77 $PROFILE_INCPATHS ${final_fflags} ${final_ldflags} $allargs -I$includedir -L$libdir $f77libs $PROFILE_PRELIB $PROFILE_FOO $rpath_flags -l at MPILIBNAME@ @LPMPILIBNAME@ $PROFILE_POSTLIB ${final_libs} @F77_OTHER_LIBS@
         rc=$?
     fi
 else
-    $Show $F77 $PROFILE_INCPATHS @WRAPPER_FFLAGS@ $allargs -I$includedir
+    $Show $F77 $PROFILE_INCPATHS ${final_fflags} $allargs -I$includedir
     rc=$?
 fi
 if [ -n "$rmfiles" ] ; then
diff --git a/src/env/mpifort.bash.in b/src/env/mpifort.bash.in
index 45a191d..89ccf36 100644
--- a/src/env/mpifort.bash.in
+++ b/src/env/mpifort.bash.in
@@ -303,11 +303,18 @@ elif [ -n "$FCMODINC" ] ; then
     FCMODDIRS="${FCMODINC}$modincdir"
 fi
 
+final_fcflags="@MPICH_MPIFORT_FCFLAGS@ @WRAPPER_FCFLAGS@"
+final_ldflags="@MPICH_MPIFORT_LDFLAGS@"
+final_libs="@MPICH_MPIFORT_LIBS@"
+if test "@INTERLIB_DEPS@" = "no" ; then
+    final_ldflags="$ldflags @LDFLAGS@ @WRAPPER_LDFLAGS@"
+    final_libs="$libs @LIBS@ @WRAPPER_LIBS@"
+fi
+
 # A temporary statement to invoke the compiler
 # Place the -L before any args incase there are any mpi libraries in there.
 # Eventually, we'll want to move this after any non-MPI implementation
 # libraries
-
 if [ "$linking" = yes ] ; then
     # Attempt to encode rpath info into the executable if the user has not
     # disabled rpath usage and some flavor of rpath makes sense on this
@@ -322,14 +329,14 @@ if [ "$linking" = yes ] ; then
     fi
 
     if [ "$nativelinking" = yes ] ; then
-        $Show $FC $PROFILE_INCPATHS @WRAPPER_FCFLAGS@ @WRAPPER_LDFLAGS@ "${allargs[@]}"
+        $Show $FC $PROFILE_INCPATHS ${final_fcflags} ${final_ldflags} "${allargs[@]}"
         rc=$?
     else
-        $Show $FC $PROFILE_INCPATHS @WRAPPER_FCFLAGS@ @WRAPPER_LDFLAGS@ "${allargs[@]}" $FCINCDIRS $FCMODDIRS -L$libdir -l at MPIFCLIBNAME@ $PROFILE_PRELIB $PROFILE_FOO $rpath_flags -l at MPILIBNAME@ @LPMPILIBNAME@ $PROFILE_POSTLIB @WRAPPER_LIBS@ @FC_OTHER_LIBS@
+        $Show $FC $PROFILE_INCPATHS ${final_fcflags} ${final_ldflags} "${allargs[@]}" $FCINCDIRS $FCMODDIRS -L$libdir -l at MPIFCLIBNAME@ $PROFILE_PRELIB $PROFILE_FOO $rpath_flags -l at MPILIBNAME@ @LPMPILIBNAME@ $PROFILE_POSTLIB ${final_libs} @FC_OTHER_LIBS@
         rc=$?
     fi
 else
-    $Show $FC $PROFILE_INCPATHS @WRAPPER_FCFLAGS@ "${allargs[@]}" $FCINCDIRS $FCMODDIRS
+    $Show $FC $PROFILE_INCPATHS ${final_fcflags} "${allargs[@]}" $FCINCDIRS $FCMODDIRS
     rc=$?
 fi
 if [ -n "$rmfiles" ] ; then
diff --git a/src/env/mpifort.sh.in b/src/env/mpifort.sh.in
index 263e696..3f89f8b 100644
--- a/src/env/mpifort.sh.in
+++ b/src/env/mpifort.sh.in
@@ -320,11 +320,18 @@ elif [ -n "$FCMODINC" ] ; then
     FCMODDIRS="${FCMODINC}$modincdir"
 fi
 
+final_fcflags="@MPICH_MPIFORT_FCFLAGS@ @WRAPPER_FCFLAGS@"
+final_ldflags="@MPICH_MPIFORT_LDFLAGS@"
+final_libs="@MPICH_MPIFORT_LIBS@"
+if test "@INTERLIB_DEPS@" = "no" ; then
+    final_ldflags="$ldflags @LDFLAGS@ @WRAPPER_LDFLAGS@"
+    final_libs="$libs @LIBS@ @WRAPPER_LIBS@"
+fi
+
 # A temporary statement to invoke the compiler
 # Place the -L before any args incase there are any mpi libraries in there.
 # Eventually, we'll want to move this after any non-MPI implementation
 # libraries
-
 if [ "$linking" = yes ] ; then
     # Attempt to encode rpath info into the executable if the user has not
     # disabled rpath usage and some flavor of rpath makes sense on this
@@ -338,14 +345,14 @@ if [ "$linking" = yes ] ; then
     fi
 
     if [ "$nativelinking" = yes ] ; then
-        $Show $FC $PROFILE_INCPATHS @WRAPPER_FCFLAGS@ @WRAPPER_LDFLAGS@ $allargs
+        $Show $FC $PROFILE_INCPATHS ${final_fcflags} ${final_ldflags} $allargs
         rc=$?
     else
-        $Show $FC $PROFILE_INCPATHS @WRAPPER_FCFLAGS@ @WRAPPER_LDFLAGS@ $allargs $FCINCDIRS $FCMODDIRS -L$libdir -l at MPIFCLIBNAME@ $PROFILE_PRELIB $PROFILE_FOO $rpath_flags -l at MPILIBNAME@ @LPMPILIBNAME@ $PROFILE_POSTLIB @WRAPPER_LIBS@ @FC_OTHER_LIBS@
+        $Show $FC $PROFILE_INCPATHS ${final_fcflags} ${final_ldflags} $allargs $FCINCDIRS $FCMODDIRS -L$libdir -l at MPIFCLIBNAME@ $PROFILE_PRELIB $PROFILE_FOO $rpath_flags -l at MPILIBNAME@ @LPMPILIBNAME@ $PROFILE_POSTLIB ${final_libs} @FC_OTHER_LIBS@
         rc=$?
     fi
 else
-    $Show $FC $PROFILE_INCPATHS @WRAPPER_FCFLAGS@ $allargs $FCINCDIRS $FCMODDIRS
+    $Show $FC $PROFILE_INCPATHS ${final_fcflags} $allargs $FCINCDIRS $FCMODDIRS
     rc=$?
 fi
 if [ -n "$rmfiles" ] ; then
diff --git a/src/mpi/romio/localdefs.in b/src/mpi/romio/localdefs.in
index bf057d1..94fd950 100644
--- a/src/mpi/romio/localdefs.in
+++ b/src/mpi/romio/localdefs.in
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 # Append ROMIO library dependencies to the global list
-EXTERNAL_LIBS="$EXTERNAL_LIBS @LIBS@"
+WRAPPER_LIBS="$WRAPPER_LIBS @LIBS@"
 
 MPI_OFFSET_TYPE="@MPI_OFFSET_TYPE@"
 FORTRAN_MPI_OFFSET="@FORTRAN_MPI_OFFSET@"
diff --git a/src/mpid/ch3/channels/nemesis/netmod/ib/subconfigure.m4 b/src/mpid/ch3/channels/nemesis/netmod/ib/subconfigure.m4
index adee81b..505746f 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/ib/subconfigure.m4
+++ b/src/mpid/ch3/channels/nemesis/netmod/ib/subconfigure.m4
@@ -23,14 +23,14 @@ AM_COND_IF([BUILD_NEMESIS_NETMOD_IB],[
     PAC_POP_FLAG(LIBS)
     if test "${dcfa_found}" = "yes" ; then
         AC_MSG_NOTICE([libdcfa is going to be linked.])
-	PAC_APPEND_FLAG([-ldcfa],[EXTERNAL_LIBS])
+	PAC_APPEND_FLAG([-ldcfa],[WRAPPER_LIBS])
     else
 	PAC_PUSH_FLAG(LIBS)
         PAC_CHECK_HEADER_LIB([infiniband/verbs.h],ibverbs,ibv_open_device,ibverbs_found=yes,ibverbs_found=no)
 	PAC_POP_FLAG(LIBS)
         if test "${ibverbs_found}" = "yes" ; then
             AC_MSG_NOTICE([libibverbs is going to be linked.])
-	    PAC_APPEND_FLAG([-libverbs],[EXTERNAL_LIBS])
+	    PAC_APPEND_FLAG([-libverbs],[WRAPPER_LIBS])
         else
             AC_MSG_ERROR([Internal error: neither ibverbs nor dcfa was found])
         fi
diff --git a/src/mpid/ch3/channels/nemesis/netmod/mxm/subconfigure.m4 b/src/mpid/ch3/channels/nemesis/netmod/mxm/subconfigure.m4
index 29f829a..3751b72 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/mxm/subconfigure.m4
+++ b/src/mpid/ch3/channels/nemesis/netmod/mxm/subconfigure.m4
@@ -37,7 +37,7 @@ AM_COND_IF([BUILD_NEMESIS_NETMOD_MXM],[
         AC_MSG_ERROR(['MXM API version Problem.  Are you running a recent version of MXM (at least 3.1)?'])
      fi;
      AC_DEFINE([ENABLE_COMM_OVERRIDES], 1, [define to add per-vc function pointers to override send and recv functions])
-     PAC_APPEND_FLAG([-lmxm],[EXTERNAL_LIBS])
+     PAC_APPEND_FLAG([-lmxm],[WRAPPER_LIBS])
 
 ])dnl end AM_COND_IF(BUILD_NEMESIS_NETMOD_MXM,...)
 ])dnl end _BODY
diff --git a/src/mpid/ch3/channels/nemesis/netmod/ofi/subconfigure.m4 b/src/mpid/ch3/channels/nemesis/netmod/ofi/subconfigure.m4
index 5705baf..093b621 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/ofi/subconfigure.m4
+++ b/src/mpid/ch3/channels/nemesis/netmod/ofi/subconfigure.m4
@@ -17,7 +17,7 @@ AM_COND_IF([BUILD_NEMESIS_NETMOD_OFI],[
     PAC_SET_HEADER_LIB_PATH(ofi)
     PAC_PUSH_FLAG(LIBS)
     PAC_CHECK_HEADER_LIB_FATAL(ofi, rdma/fabric.h, fabric, fi_getinfo)
-    PAC_APPEND_FLAG([-lfabric],[EXTERNAL_LIBS])
+    PAC_APPEND_FLAG([-lfabric],[WRAPPER_LIBS])
     PAC_POP_FLAG(LIBS)
 
     AC_DEFINE([ENABLE_COMM_OVERRIDES], 1, [define to add per-vc function pointers to override send and recv functions])
diff --git a/src/mpid/ch3/channels/nemesis/netmod/portals4/subconfigure.m4 b/src/mpid/ch3/channels/nemesis/netmod/portals4/subconfigure.m4
index 1b4db86..65d1373 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/subconfigure.m4
+++ b/src/mpid/ch3/channels/nemesis/netmod/portals4/subconfigure.m4
@@ -19,7 +19,7 @@ AM_COND_IF([BUILD_NEMESIS_NETMOD_PORTALS4],[
     PAC_SET_HEADER_LIB_PATH(portals4)
     PAC_PUSH_FLAG(LIBS)
     PAC_CHECK_HEADER_LIB_FATAL(portals4, portals4.h, portals, PtlInit)
-    PAC_APPEND_FLAG([-lportals],[EXTERNAL_LIBS])
+    PAC_APPEND_FLAG([-lportals],[WRAPPER_LIBS])
     PAC_POP_FLAG(LIBS)
     
     AC_DEFINE([ENABLE_COMM_OVERRIDES], 1, [define to add per-vc function pointers to override send and recv functions]) 
diff --git a/src/mpid/ch3/subconfigure.m4 b/src/mpid/ch3/subconfigure.m4
index 132fe59..4439a3c 100644
--- a/src/mpid/ch3/subconfigure.m4
+++ b/src/mpid/ch3/subconfigure.m4
@@ -78,7 +78,7 @@ AC_ARG_ENABLE([ftb],
    PAC_SET_HEADER_LIB_PATH([ftb])
    PAC_PUSH_FLAG(LIBS)
    PAC_CHECK_HEADER_LIB_FATAL([ftb], [libftb.h], [ftb], [FTB_Connect])
-   PAC_APPEND_FLAG([-lftb],[EXTERNAL_LIBS])
+   PAC_APPEND_FLAG([-lftb],[WRAPPER_LIBS])
    PAC_POP_FLAG(LIBS)]
 )
 
diff --git a/src/mpid/common/hcoll/subconfigure.m4 b/src/mpid/common/hcoll/subconfigure.m4
index 0050aa9..8d7c624 100644
--- a/src/mpid/common/hcoll/subconfigure.m4
+++ b/src/mpid/common/hcoll/subconfigure.m4
@@ -5,7 +5,7 @@ AC_DEFUN([PAC_SUBCFG_PREREQ_]PAC_SUBCFG_AUTO_SUFFIX,[
 	PAC_PUSH_FLAG(LIBS)
 	PAC_CHECK_HEADER_LIB([hcoll/api/hcoll_api.h],[hcoll],[hcoll_init],[have_hcoll=yes],[have_hcoll=no])
 	if test "$have_hcoll" = "yes" ; then
-	   PAC_APPEND_FLAG([-lhcoll],[EXTERNAL_LIBS])
+	   PAC_APPEND_FLAG([-lhcoll],[WRAPPER_LIBS])
 	fi
 	PAC_POP_FLAG(LIBS)
 	AM_CONDITIONAL([BUILD_HCOLL],[test "$have_hcoll" = "yes"])
diff --git a/src/pm/hydra/Makefile.am b/src/pm/hydra/Makefile.am
index 2958098..5a0b91b 100644
--- a/src/pm/hydra/Makefile.am
+++ b/src/pm/hydra/Makefile.am
@@ -7,7 +7,7 @@
 external_subdirs = @mpl_srcdir@
 external_dist_subdirs = @mpl_dist_srcdir@
 external_ldflags = -L$(top_builddir)/@mpl_srcdir@
-external_libs = -lmpl @EXTERNAL_LIBS@
+external_libs = -lmpl @WRAPPER_LIBS@
 
 bin_PROGRAMS =
 noinst_HEADERS =
diff --git a/src/pm/hydra/configure.ac b/src/pm/hydra/configure.ac
index 94b7ba0..2024f9d 100644
--- a/src/pm/hydra/configure.ac
+++ b/src/pm/hydra/configure.ac
@@ -44,9 +44,9 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 
 # Reset link flags
 PAC_RESET_LINK_FLAGS()
-EXTERNAL_LIBS=""
-export EXTERNAL_LIBS
-AC_SUBST(EXTERNAL_LIBS)
+WRAPPER_LIBS=""
+export WRAPPER_LIBS
+AC_SUBST(WRAPPER_LIBS)
 
 PAC_ARG_STRICT
 
@@ -277,7 +277,7 @@ for hydra_bss_name in ${hydra_bss_names}; do
 		PAC_POP_FLAG(LIBS)
                 if test "$have_pbs_launcher" = "yes" ; then
 		    available_launchers="$available_launchers pbs"
-		    PAC_APPEND_FLAG([-ltorque],[EXTERNAL_LIBS])
+		    PAC_APPEND_FLAG([-ltorque],[WRAPPER_LIBS])
                 fi
 		available_rmks="$available_rmks pbs"
 		;;
@@ -518,7 +518,7 @@ for hydra_ckpointlib in ${hydra_ckpointlibs}; do
 	    if test "$have_blcr" = "yes" ; then
 	       AC_DEFINE(HAVE_BLCR,1,[Define if blcr is available])
 	       available_ckpointlibs="$available_ckpointlibs blcr"
-	       PAC_APPEND_FLAG([-lcr],[EXTERNAL_LIBS])
+	       PAC_APPEND_FLAG([-lcr],[WRAPPER_LIBS])
 	    fi
 	    ;;		
 	*)
@@ -691,7 +691,7 @@ if test "$have_ftb" = "yes" ; then
    # FIXME: We need to test to make sure FTB works correctly
    PAC_APPEND_FLAG([-lpthread],[LIBS])
    AC_DEFINE(ENABLE_FTB,1,[Define if FTB is enabled])
-   PAC_APPEND_FLAG([-lftb],[EXTERNAL_LIBS])
+   PAC_APPEND_FLAG([-lftb],[WRAPPER_LIBS])
 fi
 AM_CONDITIONAL([hydra_have_ftb], [test "${have_ftb}" = "yes"])
 

http://git.mpich.org/mpich.git/commitdiff/4d93cefa8f2fb06fdc47d8f73ed46c3623b8dfd6

commit 4d93cefa8f2fb06fdc47d8f73ed46c3623b8dfd6
Author: Pavan Balaji <balaji at anl.gov>
Date:   Sat Apr 25 15:27:45 2015 -0500

    Remove MPICHLIB_LDFLAGS/LIBS
    
    It does not make sense for the user to specify LDFLAGS/LIBS that would
    only be used to build the MPICH library, but not the user application.
    Doing do will create a false dependency of the MPICH library on these
    external libraries resulting in weird interactions with the user
    application in cases where interlibrary dependencies are not
    supported.  We were anyway silently modifying the WRAPPER LDFLAGS/LIBS
    to include these anyway, so the flags themselves were weirdly screwed
    up.
    
    This patch simply removes them instead of pretending to allow them,
    but not really allowing them.
    
    Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>

diff --git a/README.vin b/README.vin
index b1ad747..d9dcfb6 100644
--- a/README.vin
+++ b/README.vin
@@ -286,10 +286,10 @@ MPICH library being compiled/linked with these flags and the flags
 internally being used in mpicc and friends.
 
 (b) MPICHLIB_CFLAGS, MPICHLIB_CPPFLAGS, MPICHLIB_CXXFLAGS,
-MPICHLIB_FFLAGS, MPICHLIB_FCFLAGS, MPICHLIB_LDFLAGS and
-MPICHLIB_LIBS (abbreviated as MPICHLIB_xFLAGS): Setting these flags
-would result in the MPICH library being compiled/linked with these
-flags. However, these flags will *not* be used by mpicc and friends.
+MPICHLIB_FFLAGS, and MPICHLIB_FCFLAGS (abbreviated as
+MPICHLIB_xFLAGS): Setting these flags would result in the MPICH
+library being compiled with these flags.  However, these flags will
+*not* be used by mpicc and friends.
 
 (c) MPICH_MAKE_CFLAGS: Setting these flags would result in MPICH's
 configure tests to not use these flags, but the makefile's to use
diff --git a/configure.ac b/configure.ac
index 7a5c461..a576e09 100644
--- a/configure.ac
+++ b/configure.ac
@@ -296,17 +296,11 @@ AC_ARG_VAR(MPICHLIB_FFLAGS,
 	[extra FFLAGS used in building MPICH libraries])
 AC_ARG_VAR(MPICHLIB_FCFLAGS,
 	[extra FCFLAGS used in building MPICH libraries])
-AC_ARG_VAR(MPICHLIB_LDFLAGS,
-	[extra LDFLAGS used in building MPICH libraries])
-AC_ARG_VAR(MPICHLIB_LIBS,
-	[extra LIBS used in building MPICH libraries])
 CFLAGS="$CFLAGS $MPICHLIB_CFLAGS"
 CPPFLAGS="$CPPFLAGS $MPICHLIB_CPPFLAGS"
 CXXFLAGS="$CXXFLAGS $MPICHLIB_CXXFLAGS"
 FFLAGS="$FFLAGS $MPICHLIB_FFLAGS"
 FCFLAGS="$FCFLAGS $MPICHLIB_FCFLAGS"
-LDFLAGS="$LDFLAGS $MPICHLIB_LDFLAGS"
-LIBS="$LIBS $MPICHLIB_LIBS"
 
 dnl include all subsystem m4 fragments now that the core autoconf functionality
 dnl has been setup.  No fragment should do anything except define

-----------------------------------------------------------------------

Summary of changes:
 Makefile.am                                        |    2 +-
 README.vin                                         |   18 +++---
 configure.ac                                       |   64 ++++++++++---------
 src/env/mpicc.bash.in                              |   19 +++++-
 src/env/mpicc.sh.in                                |   19 +++++-
 src/env/mpicxx.bash.in                             |   19 +++++-
 src/env/mpicxx.sh.in                               |   19 +++++-
 src/env/mpif77.bash.in                             |   18 +++++-
 src/env/mpif77.sh.in                               |   18 +++++-
 src/env/mpifort.bash.in                            |   19 +++++-
 src/env/mpifort.sh.in                              |   19 +++++-
 src/mpi/romio/localdefs.in                         |    2 +-
 .../ch3/channels/nemesis/netmod/ib/subconfigure.m4 |    4 +-
 .../channels/nemesis/netmod/mxm/subconfigure.m4    |    2 +-
 .../channels/nemesis/netmod/ofi/subconfigure.m4    |    2 +-
 .../nemesis/netmod/portals4/subconfigure.m4        |    2 +-
 src/mpid/ch3/subconfigure.m4                       |    2 +-
 src/mpid/common/hcoll/subconfigure.m4              |    2 +-
 src/pm/hydra/Makefile.am                           |    2 +-
 src/pm/hydra/configure.ac                          |   12 ++--
 20 files changed, 183 insertions(+), 81 deletions(-)


hooks/post-receive
-- 
MPICH primary repository


More information about the commits mailing list