Commit e1635ed2 authored by Junchao Zhang's avatar Junchao Zhang
Browse files

bug fix and add @WRAPPER_LDFLAGS@ to final_ldflags

Some special options might be added by libtool, such as -Wl,-flat_namespace -Wl,-commons,use_dylibs,
and we do not want to drop them even when interlibrary deps is on.

Also reference [eb0e7712

]

Fixes #2271
Signed-off-by: Pavan Balaji's avatarPavan Balaji <balaji@anl.gov>
parent f6ef4406
......@@ -210,11 +210,11 @@ fi
final_cflags="@MPICH_MPICC_CFLAGS@ @WRAPPER_CFLAGS@"
final_cppflags="@MPICH_MPICC_CPPFLAGS@ @WRAPPER_CPPFLAGS@"
final_ldflags="@MPICH_MPICC_LDFLAGS@"
final_ldflags="@MPICH_MPICC_LDFLAGS@ @WRAPPER_LDFLAGS@"
final_libs="@MPICH_MPICC_LIBS@"
if test "@INTERLIB_DEPS@" = "no" -o "${interlib_deps}" = "no" ; then
final_ldflags="$ldflags @LDFLAGS@ @WRAPPER_LDFLAGS@"
final_libs="$libs @LIBS@ @WRAPPER_LIBS@"
final_ldflags="${final_ldflags} @LDFLAGS@"
final_libs="${final_libs} @LIBS@ @WRAPPER_LIBS@"
fi
# -----------------------------------------------------------------------
......
......@@ -219,11 +219,11 @@ fi
final_cflags="@MPICH_MPICC_CFLAGS@ @WRAPPER_CFLAGS@"
final_cppflags="@MPICH_MPICC_CPPFLAGS@ @WRAPPER_CPPFLAGS@"
final_ldflags="@MPICH_MPICC_LDFLAGS@"
final_ldflags="@MPICH_MPICC_LDFLAGS@ @WRAPPER_LDFLAGS@"
final_libs="@MPICH_MPICC_LIBS@"
if test "@INTERLIB_DEPS@" = "no" -o "${interlib_deps}" = "no" ; then
final_ldflags="$ldflags @LDFLAGS@ @WRAPPER_LDFLAGS@"
final_libs="$libs @LIBS@ @WRAPPER_LIBS@"
final_ldflags="${final_ldflags} @LDFLAGS@"
final_libs="${final_libs} @LIBS@ @WRAPPER_LIBS@"
fi
# -----------------------------------------------------------------------
......
......@@ -216,11 +216,11 @@ fi
final_cxxflags="@MPICH_MPICXX_CXXFLAGS@ @WRAPPER_CXXFLAGS@"
final_cppflags="@MPICH_MPICXX_CPPFLAGS@ @WRAPPER_CPPFLAGS@"
final_ldflags="@MPICH_MPICXX_LDFLAGS@"
final_ldflags="@MPICH_MPICXX_LDFLAGS@ @WRAPPER_LDFLAGS@"
final_libs="@MPICH_MPICXX_LIBS@"
if test "@INTERLIB_DEPS@" = "no" -o "${interlib_deps}" = "no" ; then
final_ldflags="$ldflags @LDFLAGS@ @WRAPPER_LDFLAGS@"
final_libs="$libs @LIBS@ @WRAPPER_LIBS@"
final_ldflags="${final_ldflags} @LDFLAGS@"
final_libs="${final_libs} @LIBS@ @WRAPPER_LIBS@"
fi
# A temporary statement to invoke the compiler
......
......@@ -225,11 +225,11 @@ fi
final_cxxflags="@MPICH_MPICXX_CXXFLAGS@ @WRAPPER_CXXFLAGS@"
final_cppflags="@MPICH_MPICXX_CPPFLAGS@ @WRAPPER_CPPFLAGS@"
final_ldflags="@MPICH_MPICXX_LDFLAGS@"
final_ldflags="@MPICH_MPICXX_LDFLAGS@ @WRAPPER_LDFLAGS@"
final_libs="@MPICH_MPICXX_LIBS@"
if test "@INTERLIB_DEPS@" = "no" -o "${interlib_deps}" = "no" ; then
final_ldflags="$ldflags @LDFLAGS@ @WRAPPER_LDFLAGS@"
final_libs="$libs @LIBS@ @WRAPPER_LIBS@"
final_ldflags="${final_ldflags} @LDFLAGS@"
final_libs="${final_libs} @LIBS@ @WRAPPER_LIBS@"
fi
# A temporary statement to invoke the compiler
......
......@@ -267,11 +267,11 @@ if [ -n "$profConf" ] ; then
fi
final_fflags="@MPICH_MPIF77_FFLAGS@ @WRAPPER_FFLAGS@"
final_ldflags="@MPICH_MPIF77_LDFLAGS@"
final_ldflags="@MPICH_MPIF77_LDFLAGS@ @WRAPPER_LDFLAGS@"
final_libs="@MPICH_MPIF77_LIBS@"
if test "@INTERLIB_DEPS@" = "no" -o "${interlib_deps}" = "no" ; then
final_ldflags="$ldflags @LDFLAGS@ @WRAPPER_LDFLAGS@"
final_libs="$libs @LIBS@ @WRAPPER_LIBS@"
final_ldflags="${final_ldflags} @LDFLAGS@"
final_libs="${final_libs} @LIBS@ @WRAPPER_LIBS@"
fi
# A temporary statement to invoke the compiler
......
......@@ -289,11 +289,11 @@ if [ -n "$profConf" ] ; then
fi
final_fflags="@MPICH_MPIF77_FFLAGS@ @WRAPPER_FFLAGS@"
final_ldflags="@MPICH_MPIF77_LDFLAGS@"
final_ldflags="@MPICH_MPIF77_LDFLAGS@ @WRAPPER_LDFLAGS@"
final_libs="@MPICH_MPIF77_LIBS@"
if test "@INTERLIB_DEPS@" = "no" -o "${interlib_deps}" = "no" ; then
final_ldflags="$ldflags @LDFLAGS@ @WRAPPER_LDFLAGS@"
final_libs="$libs @LIBS@ @WRAPPER_LIBS@"
final_ldflags="${final_ldflags} @LDFLAGS@"
final_libs="${final_libs} @LIBS@ @WRAPPER_LIBS@"
fi
# A temporary statement to invoke the compiler
......
......@@ -308,11 +308,11 @@ elif [ -n "$FCMODINC" ] ; then
fi
final_fcflags="@MPICH_MPIFORT_FCFLAGS@ @WRAPPER_FCFLAGS@"
final_ldflags="@MPICH_MPIFORT_LDFLAGS@"
final_ldflags="@MPICH_MPIFORT_LDFLAGS@ @WRAPPER_LDFLAGS@"
final_libs="@MPICH_MPIFORT_LIBS@"
if test "@INTERLIB_DEPS@" = "no" -o "${interlib_deps}" = "no" ; then
final_ldflags="$ldflags @LDFLAGS@ @WRAPPER_LDFLAGS@"
final_libs="$libs @LIBS@ @WRAPPER_LIBS@"
final_ldflags="${final_ldflags} @LDFLAGS@"
final_libs="${final_libs} @LIBS@ @WRAPPER_LIBS@"
fi
# A temporary statement to invoke the compiler
......
......@@ -325,11 +325,11 @@ elif [ -n "$FCMODINC" ] ; then
fi
final_fcflags="@MPICH_MPIFORT_FCFLAGS@ @WRAPPER_FCFLAGS@"
final_ldflags="@MPICH_MPIFORT_LDFLAGS@"
final_ldflags="@MPICH_MPIFORT_LDFLAGS@ @WRAPPER_LDFLAGS@"
final_libs="@MPICH_MPIFORT_LIBS@"
if test "@INTERLIB_DEPS@" = "no" -o "${interlib_deps}" = "no" ; then
final_ldflags="$ldflags @LDFLAGS@ @WRAPPER_LDFLAGS@"
final_libs="$libs @LIBS@ @WRAPPER_LIBS@"
final_ldflags="${final_ldflags} @LDFLAGS@"
final_libs="${final_libs} @LIBS@ @WRAPPER_LIBS@"
fi
# A temporary statement to invoke the compiler
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment