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 b65699f50df5edc76f65514105e4f3e9df43acd2 (commit) from a14464d3db67a1e6dad877571cc49b99b18c7c7e (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/b65699f50df5edc76f65514105e4f3e9df... commit b65699f50df5edc76f65514105e4f3e9df43acd2 Author: Ken Raffenetti <[email protected]> Date: Wed Jan 22 12:27:44 2014 -0600 corrections to compile wrapper changes Fixes errors in commit [5bbfe808]. 1. Run config.rpath with each compiler individually, as the syntax may differ for passing options through to the linker. 2. Move the rpath flags to just before the mpich library, where they are necessary. Fixes #1044. Signed-off-by: Pavan Balaji <[email protected]> diff --git a/configure.ac b/configure.ac index cd0eaf6..7b095b2 100644 --- a/configure.ac +++ b/configure.ac @@ -1797,6 +1797,14 @@ export NEEDSPLIB AM_CONDITIONAL([BUILD_PROFILING_LIB],[test "$NEEDSPLIB" = "yes"]) +# --------------------------------------------------------------------------- +# determine rpath and other shared library flags for CC +# src/env may not exist yet in a vpath build +$MKDIR_P src/env +cc_shlib_conf=src/env/cc_shlib.conf +PAC_COMPILER_SHLIB_FLAGS([CC],[$cc_shlib_conf]) +AC_SUBST_FILE([cc_shlib_conf]) + # output rpath flags in a usable format for mpich.pc (pkg-config) if test "X$enable_wrapper_rpath" = "Xyes"; then eval WRAPPER_RPATH_LDFLAGS=\"$hardcode_libdir_flag_spec\" @@ -2082,6 +2090,11 @@ fi # Now test for Fortran compiler characteristics # ---------------------------------------------------------------------------- if test "$enable_f77" = "yes" ; then + # determine rpath and other shared library flags for F77 + f77_shlib_conf=src/env/f77_shlib.conf + PAC_COMPILER_SHLIB_FLAGS([F77],[$f77_shlib_conf]) + AC_SUBST_FILE([f77_shlib_conf]) + AC_LANG_FORTRAN77 PAC_PROG_F77_EXCLAIM_COMMENTS(has_exclaim="yes",has_exclaim="no") PAC_PROG_F77_HAS_INCDIR(src) @@ -2178,6 +2191,11 @@ MPICONSTMODNAME=mpi_constants MPISIZEOFMODNAME=mpi_sizeofs MPIBASEMODNAME=mpi_base if test "$enable_fc" = "yes" ; then + # determine rpath and other shared library flags for FC + fc_shlib_conf=src/env/fc_shlib.conf + PAC_COMPILER_SHLIB_FLAGS([FC],[$fc_shlib_conf]) + AC_SUBST_FILE([fc_shlib_conf]) + # Determine characteristics of the Fortran 90 compiler # Find a Fortran 90 compiler. Sets FC # Work around bug in autoconf that adds -g to FCFLAGS @@ -2412,6 +2430,11 @@ int main() { AC_SUBST(MPIR_CXX_COMPLEX) AC_SUBST(MPIR_CXX_DOUBLE_COMPLEX) AC_SUBST(MPIR_CXX_LONG_DOUBLE_COMPLEX) + + # determine rpath and other shared library flags for CXX + cxx_shlib_conf=src/env/cxx_shlib.conf + PAC_COMPILER_SHLIB_FLAGS([CXX],[$cxx_shlib_conf]) + AC_SUBST_FILE([cxx_shlib_conf]) fi if test "$enable_cxx" = yes; then diff --git a/src/env/Makefile.mk b/src/env/Makefile.mk index 8c5b459..9304622 100644 --- a/src/env/Makefile.mk +++ b/src/env/Makefile.mk @@ -60,7 +60,11 @@ src/env/mpif90: $(top_builddir)/src/env/mpif90.sh cp -p $? $@ endif !BUILD_BASH_SCRIPTS -DISTCLEANFILES += $(top_builddir)/src/env/mpicc \ +DISTCLEANFILES += $(top_builddir)/src/env/cc_shlib.conf \ + $(top_builddir)/src/env/cxx_shlib.conf \ + $(top_builddir)/src/env/f77_shlib.conf \ + $(top_builddir)/src/env/fc_shlib.conf \ + $(top_builddir)/src/env/mpicc \ $(top_builddir)/src/env/mpicxx \ $(top_builddir)/src/env/mpif77 \ $(top_builddir)/src/env/mpif90 diff --git a/src/env/mpicc.bash.in b/src/env/mpicc.bash.in index 29cc415..85f6c88 100644 --- a/src/env/mpicc.bash.in +++ b/src/env/mpicc.bash.in @@ -39,6 +39,9 @@ libdir=@libdir@ CC="@CC@" MPICH_VERSION="@MPICH_VERSION@" +enable_wrapper_rpath="@enable_wrapper_rpath@" +@cc_shlib_conf@ + # Internal variables # Show is set to echo to cause the compilation command to be echoed instead # of executed. @@ -214,11 +217,22 @@ fi # file or an object file. Instead, we just check for an option that # suppressing linking, such as -c or -M. 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 + # platform. + # TODO configure and config.rpath are computing more sophisticated rpath + # schemes than this simple one. Consider updating this logic accordingly. + if test "X$enable_wrapper_rpath" = "Xyes" ; then + eval rpath_flags=\"${hardcode_libdir_flag_spec}\" + else + rpath_flags="" + fi + if [ "$nativelinking" = yes ] ; then $Show $CC @WRAPPER_CPPFLAGS@ $PROFILE_INCPATHS @WRAPPER_CFLAGS@ @WRAPPER_LDFLAGS@ "${allargs[@]}" -I$includedir rc=$? else - $Show $CC @WRAPPER_CPPFLAGS@ $PROFILE_INCPATHS @WRAPPER_CFLAGS@ @WRAPPER_RPATH_LDFLAGS@ @WRAPPER_LDFLAGS@ "${allargs[@]}" -I$includedir -L$libdir $PROFILE_PRELIB $PROFILE_FOO @LPMPILIBNAME@ -l@MPILIBNAME@ $PROFILE_POSTLIB @WRAPPER_LIBS@ + $Show $CC @WRAPPER_CPPFLAGS@ $PROFILE_INCPATHS @WRAPPER_CFLAGS@ @WRAPPER_LDFLAGS@ "${allargs[@]}" -I$includedir -L$libdir $PROFILE_PRELIB $PROFILE_FOO $rpath_flags @LPMPILIBNAME@ -l@MPILIBNAME@ $PROFILE_POSTLIB @WRAPPER_LIBS@ rc=$? fi else diff --git a/src/env/mpicc.sh.in b/src/env/mpicc.sh.in index 7a0f9db..119a884 100644 --- a/src/env/mpicc.sh.in +++ b/src/env/mpicc.sh.in @@ -39,6 +39,9 @@ libdir=@libdir@ CC="@CC@" MPICH_VERSION="@MPICH_VERSION@" +enable_wrapper_rpath="@enable_wrapper_rpath@" +@cc_shlib_conf@ + # Internal variables # Show is set to echo to cause the compilation command to be echoed instead # of executed. @@ -223,11 +226,22 @@ fi # file or an object file. Instead, we just check for an option that # suppressing linking, such as -c or -M. 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 + # platform. + # TODO configure and config.rpath are computing more sophisticated rpath + # schemes than this simple one. Consider updating this logic accordingly. + if test "X$enable_wrapper_rpath" = "Xyes" ; then + eval rpath_flags=\"${hardcode_libdir_flag_spec}\" + else + rpath_flags="" + fi + if [ "$nativelinking" = yes ] ; then $Show $CC @WRAPPER_CPPFLAGS@ $PROFILE_INCPATHS @WRAPPER_CFLAGS@ @WRAPPER_LDFLAGS@ $allargs -I$includedir rc=$? else - $Show $CC @WRAPPER_CPPFLAGS@ $PROFILE_INCPATHS @WRAPPER_CFLAGS@ @WRAPPER_RPATH_LDFLAGS@ @WRAPPER_LDFLAGS@ $allargs -I$includedir -L$libdir $PROFILE_PRELIB $PROFILE_FOO @LPMPILIBNAME@ -l@MPILIBNAME@ $PROFILE_POSTLIB @WRAPPER_LIBS@ + $Show $CC @WRAPPER_CPPFLAGS@ $PROFILE_INCPATHS @WRAPPER_CFLAGS@ @WRAPPER_LDFLAGS@ $allargs -I$includedir -L$libdir $PROFILE_PRELIB $PROFILE_FOO $rpath_flags @LPMPILIBNAME@ -l@MPILIBNAME@ $PROFILE_POSTLIB @WRAPPER_LIBS@ rc=$? fi else diff --git a/src/env/mpicxx.bash.in b/src/env/mpicxx.bash.in index 61e56fe..3974ff9 100644 --- a/src/env/mpicxx.bash.in +++ b/src/env/mpicxx.bash.in @@ -36,6 +36,9 @@ libdir=@libdir@ CXX="@CXX@" MPICH_VERSION="@MPICH_VERSION@" +enable_wrapper_rpath="@enable_wrapper_rpath@" +@cxx_shlib_conf@ + # Internal variables # Show is set to echo to cause the compilation command to be echoed instead # of executed. @@ -211,11 +214,22 @@ fi # 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 + # platform. + # TODO configure and config.rpath are computing more sophisticated rpath + # schemes than this simple one. Consider updating this logic accordingly. + if test "X$enable_wrapper_rpath" = "Xyes" ; then + eval rpath_flags=\"${hardcode_libdir_flag_spec}\" + else + rpath_flags="" + fi + if [ "$nativelinking" = yes ] ; then $Show $CXX $PROFILE_INCPATHS @WRAPPER_CXXFLAGS@ @WRAPPER_LDFLAGS@ "${allargs[@]}" -I$includedir rc=$? else - $Show $CXX $PROFILE_INCPATHS @WRAPPER_CXXFLAGS@ @WRAPPER_RPATH_LDFLAGS@ @WRAPPER_LDFLAGS@ "${allargs[@]}" -I$includedir -L$libdir $cxxlibs $PROFILE_PRELIB $PROFILE_FOO @LPMPILIBNAME@ -l@MPILIBNAME@ $PROFILE_POSTLIB @WRAPPER_LIBS@ + $Show $CXX $PROFILE_INCPATHS @WRAPPER_CXXFLAGS@ @WRAPPER_LDFLAGS@ "${allargs[@]}" -I$includedir -L$libdir $cxxlibs $PROFILE_PRELIB $PROFILE_FOO $rpath_flags @LPMPILIBNAME@ -l@MPILIBNAME@ $PROFILE_POSTLIB @WRAPPER_LIBS@ rc=$? fi else diff --git a/src/env/mpicxx.sh.in b/src/env/mpicxx.sh.in index 92424cc..48195a1 100644 --- a/src/env/mpicxx.sh.in +++ b/src/env/mpicxx.sh.in @@ -36,6 +36,9 @@ libdir=@libdir@ CXX="@CXX@" MPICH_VERSION="@MPICH_VERSION@" +enable_wrapper_rpath="@enable_wrapper_rpath@" +@cxx_shlib_conf@ + # Internal variables # Show is set to echo to cause the compilation command to be echoed instead # of executed. @@ -220,11 +223,22 @@ fi # 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 + # platform. + # TODO configure and config.rpath are computing more sophisticated rpath + # schemes than this simple one. Consider updating this logic accordingly. + if test "X$enable_wrapper_rpath" = "Xyes" ; then + eval rpath_flags=\"${hardcode_libdir_flag_spec}\" + else + rpath_flags="" + fi + if [ "$nativelinking" = yes ] ; then $Show $CXX $PROFILE_INCPATHS @WRAPPER_CXXFLAGS@ @WRAPPER_LDFLAGS@ $allargs -I$includedir rc=$? else - $Show $CXX $PROFILE_INCPATHS @WRAPPER_CXXFLAGS@ @WRAPPER_RPATH_LDFLAGS@ @WRAPPER_LDFLAGS@ $allargs -I$includedir -L$libdir $cxxlibs $PROFILE_PRELIB $PROFILE_FOO @LPMPILIBNAME@ -l@MPILIBNAME@ $PROFILE_POSTLIB @WRAPPER_LIBS@ + $Show $CXX $PROFILE_INCPATHS @WRAPPER_CXXFLAGS@ @WRAPPER_LDFLAGS@ $allargs -I$includedir -L$libdir $cxxlibs $PROFILE_PRELIB $PROFILE_FOO $rpath_flags @LPMPILIBNAME@ -l@MPILIBNAME@ $PROFILE_POSTLIB @WRAPPER_LIBS@ rc=$? fi else diff --git a/src/env/mpif77.bash.in b/src/env/mpif77.bash.in index 9625dd3..a3567c2 100644 --- a/src/env/mpif77.bash.in +++ b/src/env/mpif77.bash.in @@ -42,6 +42,9 @@ F77="@F77@" F77CPP="@F77CPP@" MPICH_VERSION="@MPICH_VERSION@" +enable_wrapper_rpath="@enable_wrapper_rpath@" +@f77_shlib_conf@ + # Internal variables # Show is set to echo to cause the compilation command to be echoed instead # of executed. @@ -261,11 +264,22 @@ fi # 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 + # platform. + # TODO configure and config.rpath are computing more sophisticated rpath + # schemes than this simple one. Consider updating this logic accordingly. + if test "X$enable_wrapper_rpath" = "Xyes" ; then + eval rpath_flags=\"${hardcode_libdir_flag_spec}\" + else + rpath_flags="" + fi + if [ "$nativelinking" = yes ] ; then $Show $F77 $PROFILE_INCPATHS @WRAPPER_FFLAGS@ @WRAPPER_LDFLAGS@ "${allargs[@]}" -I$includedir rc=$? else - $Show $F77 $PROFILE_INCPATHS @WRAPPER_FFLAGS@ @WRAPPER_RPATH_LDFLAGS@ @WRAPPER_LDFLAGS@ "${allargs[@]}" -I$includedir -L$libdir $PROFILE_PRELIB $PROFILE_FOO @LPMPILIBNAME@ -l@MPILIBNAME@ $PROFILE_POSTLIB @WRAPPER_LIBS@ @F77_OTHER_LIBS@ + $Show $F77 $PROFILE_INCPATHS @WRAPPER_FFLAGS@ @WRAPPER_LDFLAGS@ "${allargs[@]}" -I$includedir -L$libdir $PROFILE_PRELIB $PROFILE_FOO $rpath_flags @LPMPILIBNAME@ -l@MPILIBNAME@ $PROFILE_POSTLIB @WRAPPER_LIBS@ @F77_OTHER_LIBS@ rc=$? fi else diff --git a/src/env/mpif77.sh.in b/src/env/mpif77.sh.in index 73f664d..0366d77 100644 --- a/src/env/mpif77.sh.in +++ b/src/env/mpif77.sh.in @@ -42,6 +42,9 @@ F77="@F77@" F77CPP="@F77CPP@" MPICH_VERSION="@MPICH_VERSION@" +enable_wrapper_rpath="@enable_wrapper_rpath@" +@f77_shlib_conf@ + # Internal variables # Show is set to echo to cause the compilation command to be echoed instead # of executed. @@ -283,11 +286,22 @@ fi # 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 + # platform. + # TODO configure and config.rpath are computing more sophisticated rpath + # schemes than this simple one. Consider updating this logic accordingly. + if test "X$enable_wrapper_rpath" = "Xyes" ; then + eval rpath_flags=\"${hardcode_libdir_flag_spec}\" + else + rpath_flags="" + fi + if [ "$nativelinking" = yes ] ; then $Show $F77 $PROFILE_INCPATHS @WRAPPER_FFLAGS@ @WRAPPER_LDFLAGS@ $allargs -I$includedir rc=$? else - $Show $F77 $PROFILE_INCPATHS @WRAPPER_FFLAGS@ @WRAPPER_RPATH_LDFLAGS@ @WRAPPER_LDFLAGS@ $allargs -I$includedir -L$libdir $PROFILE_PRELIB $PROFILE_FOO @LPMPILIBNAME@ -l@MPILIBNAME@ $PROFILE_POSTLIB @WRAPPER_LIBS@ @F77_OTHER_LIBS@ + $Show $F77 $PROFILE_INCPATHS @WRAPPER_FFLAGS@ @WRAPPER_LDFLAGS@ $allargs -I$includedir -L$libdir $PROFILE_PRELIB $PROFILE_FOO $rpath_flags @LPMPILIBNAME@ -l@MPILIBNAME@ $PROFILE_POSTLIB @WRAPPER_LIBS@ @F77_OTHER_LIBS@ rc=$? fi else diff --git a/src/env/mpif90.bash.in b/src/env/mpif90.bash.in index c93ff1f..5596dd6 100644 --- a/src/env/mpif90.bash.in +++ b/src/env/mpif90.bash.in @@ -55,6 +55,9 @@ FCEXT="@FCEXT@" MPICH_VERSION="@MPICH_VERSION@" +enable_wrapper_rpath="@enable_wrapper_rpath@" +@fc_shlib_conf@ + # Internal variables # Show is set to echo to cause the compilation command to be echoed instead # of executed. @@ -312,11 +315,23 @@ fi # 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 + # platform. + # TODO configure and config.rpath are computing more sophisticated rpath + # schemes than this simple one. Consider updating this logic accordingly. + if test "X$enable_wrapper_rpath" = "Xyes" ; then + # prepend the path for the shared libraries to the library list + eval rpath_flags=\"${hardcode_libdir_flag_spec}\" + else + rpath_flags="" + fi + if [ "$nativelinking" = yes ] ; then $Show $FC $PROFILE_INCPATHS @WRAPPER_FCFLAGS@ @WRAPPER_LDFLAGS@ "${allargs[@]}" rc=$? else - $Show $FC $PROFILE_INCPATHS @WRAPPER_FCFLAGS@ @WRAPPER_RPATH_LDFLAGS@ @WRAPPER_LDFLAGS@ "${allargs[@]}" $FCINCDIRS $FCMODDIRS -L$libdir $FCMODLIBS $PROFILE_PRELIB $PROFILE_FOO @LPMPILIBNAME@ -l@MPILIBNAME@ $PROFILE_POSTLIB @WRAPPER_LIBS@ @FC_OTHER_LIBS@ + $Show $FC $PROFILE_INCPATHS @WRAPPER_FCFLAGS@ @WRAPPER_LDFLAGS@ "${allargs[@]}" $FCINCDIRS $FCMODDIRS -L$libdir $FCMODLIBS $PROFILE_PRELIB $PROFILE_FOO $rpath_flags @LPMPILIBNAME@ -l@MPILIBNAME@ $PROFILE_POSTLIB @WRAPPER_LIBS@ @FC_OTHER_LIBS@ rc=$? fi else diff --git a/src/env/mpif90.sh.in b/src/env/mpif90.sh.in index 6f862c0..f33bf6e 100644 --- a/src/env/mpif90.sh.in +++ b/src/env/mpif90.sh.in @@ -55,6 +55,9 @@ FCEXT="@FCEXT@" # MPICH_VERSION="@MPICH_VERSION@" +enable_wrapper_rpath="@enable_wrapper_rpath@" +@fc_shlib_conf@ + # Internal variables # Show is set to echo to cause the compilation command to be echoed instead # of executed. @@ -329,11 +332,22 @@ fi # 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 + # platform. + # TODO configure and config.rpath are computing more sophisticated rpath + # schemes than this simple one. Consider updating this logic accordingly. + if test "X$enable_wrapper_rpath" = "Xyes" ; then + eval rpath_flags=\"${hardcode_libdir_flag_spec}\" + else + rpath_flags="" + fi + if [ "$nativelinking" = yes ] ; then $Show $FC $PROFILE_INCPATHS @WRAPPER_FCFLAGS@ @WRAPPER_LDFLAGS@ $allargs rc=$? else - $Show $FC $PROFILE_INCPATHS @WRAPPER_FCFLAGS@ @WRAPPER_RPATH_LDFLAGS@ @WRAPPER_LDFLAGS@ $allargs $FCINCDIRS $FCMODDIRS -L$libdir $FCMODLIBS $PROFILE_PRELIB $PROFILE_FOO @LPMPILIBNAME@ -l@MPILIBNAME@ $PROFILE_POSTLIB @WRAPPER_LIBS@ @FC_OTHER_LIBS@ + $Show $FC $PROFILE_INCPATHS @WRAPPER_FCFLAGS@ @WRAPPER_LDFLAGS@ $allargs $FCINCDIRS $FCMODDIRS -L$libdir $FCMODLIBS $PROFILE_PRELIB $PROFILE_FOO $rpath_flags @LPMPILIBNAME@ -l@MPILIBNAME@ $PROFILE_POSTLIB @WRAPPER_LIBS@ @FC_OTHER_LIBS@ rc=$? fi else ----------------------------------------------------------------------- Summary of changes: configure.ac | 23 +++++++++++++++++++++++ src/env/Makefile.mk | 6 +++++- src/env/mpicc.bash.in | 16 +++++++++++++++- src/env/mpicc.sh.in | 16 +++++++++++++++- src/env/mpicxx.bash.in | 16 +++++++++++++++- src/env/mpicxx.sh.in | 16 +++++++++++++++- src/env/mpif77.bash.in | 16 +++++++++++++++- src/env/mpif77.sh.in | 16 +++++++++++++++- src/env/mpif90.bash.in | 17 ++++++++++++++++- src/env/mpif90.sh.in | 16 +++++++++++++++- 10 files changed, 149 insertions(+), 9 deletions(-) hooks/post-receive -- MPICH primary repository