[Darshan-commits] [Git][darshan/darshan][carns/dev-dyn-link-updates] add darshan-config option for dynamic link options
Philip Carns
xgitlab at cels.anl.gov
Fri Mar 20 07:45:07 CDT 2020
Philip Carns pushed to branch carns/dev-dyn-link-updates at darshan / darshan
Commits:
6bab9cea by Phil Carns at 2020-03-20T08:44:49-04:00
add darshan-config option for dynamic link options
- - - - -
1 changed file:
- darshan-runtime/darshan-config.in
Changes:
=====================================
darshan-runtime/darshan-config.in
=====================================
@@ -5,17 +5,22 @@ DARSHAN_SHARE_PATH="@darshan_share_path@"
DARSHAN_LD_FLAGS="@LDFLAGS@"
# NOTE:
-# - we deliberately list libdarshan twice in the link command. The
-# first is necessary to correctly use the MPI profiling interface. The
-# final one is necessary to give the linker a change to resolve indirect
-# dependencies on PnetCDF and HDF5 symbols (if the app used a library which
-# in turn used one of those HLLs).
+# - we deliberately list libdarshan twice in the link command when
+# statically linking. The first sets symbol wrapping options early in the
+# link line. The final one is necessary to give the linker a change to
+# resolve indirect dependencies on PnetCDF and HDF5 symbols (if the
+# app used a library which in turn used one of those HLLs).
PRE_LD_FLAGS="-L$DARSHAN_LIB_PATH $DARSHAN_LD_FLAGS -ldarshan -lz -Wl,@$DARSHAN_SHARE_PATH/ld-opts/darshan-base-ld-opts"
POST_LD_FLAGS="-L$DARSHAN_LIB_PATH -Wl,--start-group -ldarshan -ldarshan-stubs -Wl,--end-group -lz -lrt -lpthread"
+# NOTE:
+# - when dynamic linking there is no need for wrapping options, we simply
+# need to get the darshan symbol definitions early enough in the link order.
+DYN_LD_FLAGS="-L$DARSHAN_LIB_PATH $DARSHAN_LD_FLAGS -ldarshan"
+
usage="\
-Usage: darshan-config [--pre-ld-flags] [--post-ld-flags]"
+Usage: darshan-config [--pre-ld-flags] [--post-ld-flags] [--dyn-ld-flags]"
if test $# -eq 0; then
echo "${usage}" 1>&2
@@ -35,6 +40,9 @@ while test $# -gt 0; do
--post-ld-flags)
echo $POST_LD_FLAGS
;;
+ --dyn-ld-flags)
+ echo $DYN_LD_FLAGS
+ ;;
*)
echo "${usage}" 1>&2
exit 1
View it on GitLab: https://xgitlab.cels.anl.gov/darshan/darshan/commit/6bab9ceac34c9104bbe9fddb90ba11d8bbd04947
--
View it on GitLab: https://xgitlab.cels.anl.gov/darshan/darshan/commit/6bab9ceac34c9104bbe9fddb90ba11d8bbd04947
You're receiving this email because of your account on xgitlab.cels.anl.gov.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/darshan-commits/attachments/20200320/cb3c8ba5/attachment-0001.html>
More information about the Darshan-commits
mailing list