[Darshan-commits] [Git][darshan/darshan][master] 2 commits: fix for fscanf wrappers in static linking
Shane Snyder
xgitlab at cels.anl.gov
Tue Apr 7 09:24:23 CDT 2020
Shane Snyder pushed to branch master at darshan / darshan
Commits:
201d8d96 by Shane Snyder at 2020-04-07T09:24:20-05:00
fix for fscanf wrappers in static linking
- - - - -
50c4669d by Shane Snyder at 2020-04-07T09:24:20-05:00
Merge branch 'dev-fscanf-wrapper-fix' into 'master'
fix for fscanf wrappers in static linking
See merge request darshan/darshan!43
- - - - -
4 changed files:
- darshan-runtime/Makefile.in
- darshan-runtime/configure
- darshan-runtime/configure.in
- darshan-runtime/share/ld-opts/darshan-stdio-ld-opts → darshan-runtime/share/ld-opts/darshan-stdio-ld-opts.in
Changes:
=====================================
darshan-runtime/Makefile.in
=====================================
@@ -251,7 +251,7 @@ ifdef BUILD_POSIX_MODULE
install -m 644 $(srcdir)/share/ld-opts/darshan-posix-ld-opts $(DESTDIR)$(datarootdir)/ld-opts/darshan-posix-ld-opts
endif
ifdef BUILD_STDIO_MODULE
- install -m 644 $(srcdir)/share/ld-opts/darshan-stdio-ld-opts $(DESTDIR)$(datarootdir)/ld-opts/darshan-stdio-ld-opts
+ install -m 644 share/ld-opts/darshan-stdio-ld-opts $(DESTDIR)$(datarootdir)/ld-opts/darshan-stdio-ld-opts
endif
ifdef BUILD_MPIIO_MODULE
install -m 644 $(srcdir)/share/ld-opts/darshan-mpiio-ld-opts $(DESTDIR)$(datarootdir)/ld-opts/darshan-mpiio-ld-opts
=====================================
darshan-runtime/configure
=====================================
@@ -632,6 +632,7 @@ BUILD_PNETCDF_MODULE
DARSHAN_MPIIO_LD_OPTS
BUILD_MPIIO_MODULE
BUILD_DXT_MODULE
+DARSHAN_STDIO_ADD_FSCANF_LD_OPTS
DARSHAN_STDIO_LD_OPTS
BUILD_STDIO_MODULE
DARSHAN_POSIX_LD_OPTS
@@ -4853,12 +4854,14 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
+ DARSHAN_STDIO_ADD_FSCANF_LD_OPTS="--wrap=__isoc99_fscanf"
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
$as_echo "#define HAVE_FSCANF_REDIRECT 1" >>confdefs.h
+ DARSHAN_STDIO_ADD_FSCANF_LD_OPTS=""
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
@@ -4890,7 +4893,8 @@ DARSHAN_VERSION="3.2.0-pre1"
-ac_config_files="$ac_config_files Makefile darshan-mk-log-dirs.pl darshan-gen-cc.pl darshan-gen-cxx.pl darshan-gen-fortran.pl darshan-config share/craype-1.x/darshan-module share/craype-2.x/darshan-module lib/pkgconfig/darshan-runtime.pc share/mpi-profile/darshan-cc.conf share/mpi-profile/darshan-cxx.conf share/mpi-profile/darshan-f.conf share/mpi-profile/darshan-cc-static.conf share/mpi-profile/darshan-cxx-static.conf share/mpi-profile/darshan-f-static.conf share/ld-opts/darshan-base-ld-opts"
+
+ac_config_files="$ac_config_files Makefile darshan-mk-log-dirs.pl darshan-gen-cc.pl darshan-gen-cxx.pl darshan-gen-fortran.pl darshan-config share/craype-1.x/darshan-module share/craype-2.x/darshan-module lib/pkgconfig/darshan-runtime.pc share/mpi-profile/darshan-cc.conf share/mpi-profile/darshan-cxx.conf share/mpi-profile/darshan-f.conf share/mpi-profile/darshan-cc-static.conf share/mpi-profile/darshan-cxx-static.conf share/mpi-profile/darshan-f-static.conf share/ld-opts/darshan-base-ld-opts share/ld-opts/darshan-stdio-ld-opts"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
@@ -5601,6 +5605,7 @@ do
"share/mpi-profile/darshan-cxx-static.conf") CONFIG_FILES="$CONFIG_FILES share/mpi-profile/darshan-cxx-static.conf" ;;
"share/mpi-profile/darshan-f-static.conf") CONFIG_FILES="$CONFIG_FILES share/mpi-profile/darshan-f-static.conf" ;;
"share/ld-opts/darshan-base-ld-opts") CONFIG_FILES="$CONFIG_FILES share/ld-opts/darshan-base-ld-opts" ;;
+ "share/ld-opts/darshan-stdio-ld-opts") CONFIG_FILES="$CONFIG_FILES share/ld-opts/darshan-stdio-ld-opts" ;;
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
esac
=====================================
darshan-runtime/configure.in
=====================================
@@ -487,9 +487,11 @@ AC_TRY_COMPILE(
int __isoc99_fscanf(FILE *stream, const char *format, ...) {return(0);}
],
[],
- AC_MSG_RESULT(no),
+ AC_MSG_RESULT(no)
+ DARSHAN_STDIO_ADD_FSCANF_LD_OPTS="--wrap=__isoc99_fscanf",
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_FSCANF_REDIRECT, 1, Define if fscanf is redirected to another function)
+ DARSHAN_STDIO_ADD_FSCANF_LD_OPTS=""
)
@@ -508,6 +510,7 @@ AC_SUBST(BUILD_POSIX_MODULE)
AC_SUBST(DARSHAN_POSIX_LD_OPTS)
AC_SUBST(BUILD_STDIO_MODULE)
AC_SUBST(DARSHAN_STDIO_LD_OPTS)
+AC_SUBST(DARSHAN_STDIO_ADD_FSCANF_LD_OPTS)
AC_SUBST(BUILD_DXT_MODULE)
AC_SUBST(BUILD_MPIIO_MODULE)
AC_SUBST(DARSHAN_MPIIO_LD_OPTS)
@@ -535,6 +538,7 @@ share/mpi-profile/darshan-cc-static.conf
share/mpi-profile/darshan-cxx-static.conf
share/mpi-profile/darshan-f-static.conf
share/ld-opts/darshan-base-ld-opts
+share/ld-opts/darshan-stdio-ld-opts
)
msg="Building Darshan with CC=$CC and with the following features:"
=====================================
darshan-runtime/share/ld-opts/darshan-stdio-ld-opts → darshan-runtime/share/ld-opts/darshan-stdio-ld-opts.in
=====================================
@@ -27,5 +27,5 @@
--wrap=fsetpos
--wrap=fsetpos64
--wrap=rewind
---wrap=__isoc99_fscanf
--wrap=printf
+ at DARSHAN_STDIO_ADD_FSCANF_LD_OPTS@
View it on GitLab: https://xgitlab.cels.anl.gov/darshan/darshan/compare/7715697e435be5acdfdf0b4973bb4c62bcaa383c...50c4669deba4a794b4be91e9a4fb5bddca162991
--
View it on GitLab: https://xgitlab.cels.anl.gov/darshan/darshan/compare/7715697e435be5acdfdf0b4973bb4c62bcaa383c...50c4669deba4a794b4be91e9a4fb5bddca162991
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/20200407/8590cf91/attachment-0001.html>
More information about the Darshan-commits
mailing list