Commit 1592fd9f authored by Shane Snyder's avatar Shane Snyder

modules now define ld options in file

parent 1a856178
......@@ -101,6 +101,8 @@ endif
install -m 755 share/mpi-profile/darshan-bg-cc.conf $(datarootdir)/mpi-profile/darshan-bg-cc.conf
install -m 755 share/mpi-profile/darshan-bg-cxx.conf $(datarootdir)/mpi-profile/darshan-bg-cxx.conf
install -m 755 share/mpi-profile/darshan-bg-f.conf $(datarootdir)/mpi-profile/darshan-bg-f.conf
install -m 644 darshan-base-ld-opts $(datarootdir)/darshan-base-ld-opts
install -m 644 darshan-posix-ld-opts $(datarootdir)/darshan-posix-ld-opts
install -d $(libdir)/pkgconfig
install -m 644 lib/pkgconfig/darshan-runtime.pc $(libdir)/pkgconfig/darshan-runtime.pc
......@@ -108,5 +110,5 @@ clean::
rm -f *.o *.a lib/*.o lib/*.po lib/*.a lib/*.so
distclean:: clean
rm -f darshan-runtime-config.h darshan-gen-cxx.pl darshan-gen-fortran.pl darshan-gen-cc.pl darshan-mk-log-dirs.pl aclocal.m4 autom4te.cache/* config.status config.log Makefile
rm -f darshan-runtime-config.h darshan-gen-cxx.pl darshan-gen-fortran.pl darshan-gen-cc.pl darshan-mk-log-dirs.pl darshan-config darshan-base-ld-opts aclocal.m4 autom4te.cache/* config.status config.log Makefile
rm -rf autom4te.cache
......@@ -624,9 +624,8 @@ LIBOBJS
MPICH_LIB_OLD
DARSHAN_VERSION
DISABLE_LDPRELOAD
CP_WRAPPERS
__CP_LOG_PATH
darshan_bin_path
darshan_share_path
darshan_lib_path
PRI_MACROS_BROKEN
EGREP
......@@ -4081,9 +4080,6 @@ done
#CP_WRAPPERS="-Wl,-u,MPI_Init,-u,MPI_Wtime,-wrap,write,-wrap,open,-wrap,creat,-wrap,creat64,-wrap,open64,-wrap,close,-wrap,read,-wrap,lseek,-wrap,lseek64,-wrap,pread,-wrap,pwrite,-wrap,readv,-wrap,writev,-wrap,__xstat,-wrap,__lxstat,-wrap,__fxstat,-wrap,__xstat64,-wrap,__lxstat64,-wrap,__fxstat64,-wrap,mmap,-wrap,mmap64,-wrap,fopen,-wrap,fclose,-wrap,fread,-wrap,fwrite,-wrap,fseek,-wrap,fopen64,-wrap,pread64,-wrap,pwrite64,-wrap,fsync,-wrap,fdatasync,-wrap,ncmpi_create,-wrap,ncmpi_open,-wrap,ncmpi_close,-wrap,H5Fcreate,-wrap,H5Fopen,-wrap,H5Fclose,-wrap,aio_write,-wrap,aio_write64,-wrap,aio_read,-wrap,aio_read64,-wrap,lio_listio,-wrap,lio_listio64,-wrap,aio_return,-wrap,aio_return64,-wrap,mkstemp,-wrap,mkostemp,-wrap,mkstemps,-wrap,mkostemps"
# libc functions wrapped by darshan
CP_WRAPPERS="-Wl,-u,MPI_Init,-u,MPI_Wtime,-wrap,open,-wrap,open64,-wrap,creat,-wrap,creat64,-wrap,read,-wrap,write,-wrap,pread,-wrap,pwrite,-wrap,pread64,-wrap,pwrite64,-wrap,readv,-wrap,writev,-wrap,close"
# We need to know the value of the $libdir and $bindir variables so that
# we can reference the correct path in the darshan compiler wrappers.
# Unfortunately, those two variables are not normally evaluated by autoconf.
......@@ -4099,7 +4095,7 @@ saveExecprefix=$exec_prefix
test "x$prefix" = xNONE && prefix=$ac_default_prefix
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
eval darshan_lib_path=$libdir
eval darshan_bin_path=$bindir
eval darshan_share_path=$datarootdir
prefix=$savePrefix
exec_prefix=$saveExecprefix
......@@ -4273,8 +4269,7 @@ DARSHAN_VERSION="3.0.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-bg-cc.conf share/mpi-profile/darshan-bg-cxx.conf share/mpi-profile/darshan-bg-f.conf"
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-base-ld-opts 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-bg-cc.conf share/mpi-profile/darshan-bg-cxx.conf share/mpi-profile/darshan-bg-f.conf"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
......@@ -4973,6 +4968,7 @@ do
"darshan-gen-cc.pl") CONFIG_FILES="$CONFIG_FILES darshan-gen-cc.pl" ;;
"darshan-gen-cxx.pl") CONFIG_FILES="$CONFIG_FILES darshan-gen-cxx.pl" ;;
"darshan-gen-fortran.pl") CONFIG_FILES="$CONFIG_FILES darshan-gen-fortran.pl" ;;
"darshan-base-ld-opts") CONFIG_FILES="$CONFIG_FILES darshan-base-ld-opts" ;;
"darshan-config") CONFIG_FILES="$CONFIG_FILES darshan-config" ;;
"share/craype-1.x/darshan-module") CONFIG_FILES="$CONFIG_FILES share/craype-1.x/darshan-module" ;;
"share/craype-2.x/darshan-module") CONFIG_FILES="$CONFIG_FILES share/craype-2.x/darshan-module" ;;
......
......@@ -189,9 +189,6 @@ AC_CHECK_HEADERS(mntent.h sys/mount.h)
#CP_WRAPPERS="-Wl,-u,MPI_Init,-u,MPI_Wtime,-wrap,write,-wrap,open,-wrap,creat,-wrap,creat64,-wrap,open64,-wrap,close,-wrap,read,-wrap,lseek,-wrap,lseek64,-wrap,pread,-wrap,pwrite,-wrap,readv,-wrap,writev,-wrap,__xstat,-wrap,__lxstat,-wrap,__fxstat,-wrap,__xstat64,-wrap,__lxstat64,-wrap,__fxstat64,-wrap,mmap,-wrap,mmap64,-wrap,fopen,-wrap,fclose,-wrap,fread,-wrap,fwrite,-wrap,fseek,-wrap,fopen64,-wrap,pread64,-wrap,pwrite64,-wrap,fsync,-wrap,fdatasync,-wrap,ncmpi_create,-wrap,ncmpi_open,-wrap,ncmpi_close,-wrap,H5Fcreate,-wrap,H5Fopen,-wrap,H5Fclose,-wrap,aio_write,-wrap,aio_write64,-wrap,aio_read,-wrap,aio_read64,-wrap,lio_listio,-wrap,lio_listio64,-wrap,aio_return,-wrap,aio_return64,-wrap,mkstemp,-wrap,mkostemp,-wrap,mkstemps,-wrap,mkostemps"
# libc functions wrapped by darshan
CP_WRAPPERS="-Wl,-u,MPI_Init,-u,MPI_Wtime,-wrap,open,-wrap,open64,-wrap,creat,-wrap,creat64,-wrap,read,-wrap,write,-wrap,pread,-wrap,pwrite,-wrap,pread64,-wrap,pwrite64,-wrap,readv,-wrap,writev,-wrap,close"
# We need to know the value of the $libdir and $bindir variables so that
# we can reference the correct path in the darshan compiler wrappers.
# Unfortunately, those two variables are not normally evaluated by autoconf.
......@@ -207,7 +204,7 @@ saveExecprefix=$exec_prefix
test "x$prefix" = xNONE && prefix=$ac_default_prefix
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
eval darshan_lib_path=$libdir
eval darshan_bin_path=$bindir
eval darshan_share_path=$datarootdir
prefix=$savePrefix
exec_prefix=$saveExecprefix
......@@ -298,10 +295,9 @@ AS_IF([$CC -show foo.c -o foo |grep lmpich >& /dev/null],
DARSHAN_VERSION="AC_PACKAGE_VERSION"
AC_SUBST(darshan_lib_path)
AC_SUBST(darshan_bin_path)
AC_SUBST(darshan_share_path)
AC_SUBST(LDFLAGS)
AC_SUBST(__CP_LOG_PATH)
AC_SUBST(CP_WRAPPERS)
AC_SUBST(DISABLE_LDPRELOAD)
AC_SUBST(DARSHAN_VERSION)
AC_SUBST(MPICH_LIB_OLD)
......@@ -310,6 +306,7 @@ darshan-mk-log-dirs.pl
darshan-gen-cc.pl
darshan-gen-cxx.pl
darshan-gen-fortran.pl
darshan-base-ld-opts
darshan-config
share/craype-1.x/darshan-module
share/craype-2.x/darshan-module
......
@@darshan_share_path@/darshan-posix-ld-opts
#!/bin/sh
CP_WRAPPERS="@CP_WRAPPERS@"
DARSHAN_LIB_PATH="@darshan_lib_path@"
DARSHAN_SHARE_PATH="@darshan_share_path@"
DARSHAN_LD_FLAGS="@LDFLAGS@"
# NOTE:
......@@ -11,7 +11,7 @@ DARSHAN_LD_FLAGS="@LDFLAGS@"
# 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 $CP_WRAPPERS"
PRE_LD_FLAGS="-L$DARSHAN_LIB_PATH $DARSHAN_LD_FLAGS -ldarshan -lz -Wl,@$DARSHAN_SHARE_PATH/darshan-base-ld-opts"
POST_LD_FLAGS="-L$DARSHAN_LIB_PATH -ldarshan -lz -lrt -lpthread"
usage="\
......
--wrap=open
--wrap=open64
--wrap=creat
--wrap=creat64
--wrap=read
--wrap=write
--wrap=pread
--wrap=pwrite
--wrap=pread64
--wrap=pwrite64
--wrap=readv
--wrap=writev
--wrap=close
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