From 0b87572b6f484e33139ab7f8aa472d583bf3a7d9 Mon Sep 17 00:00:00 2001 From: carns Date: Wed, 2 Apr 2014 15:36:34 +0000 Subject: [PATCH] Fixes #114; make darshan-util honor the CC variable for compiler to use. git-svn-id: https://svn.mcs.anl.gov/repos/darshan/trunk@847 3b7491f3-a168-0410-bf4b-c445ed680a29 --- ChangeLog | 3 +++ darshan-util/Makefile.in | 20 ++++++++++---------- darshan-util/configure | 2 ++ darshan-util/doc/darshan-util.txt | 9 +++++++++ 4 files changed, 24 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index e2787e8..f904e35 100644 --- a/ChangeLog +++ b/ChangeLog @@ -14,6 +14,9 @@ darshan-2.2.9-pre1 libraries. - Fix "undefined symbol: dlsym" error when using preloaded dynamic library on some platforms, reported by Florin Isaila. +* Enhancements: + - Honor CC variable to allow darshan-util to be built with other compilers + besides gcc. darshan-2.2.8 ============= diff --git a/darshan-util/Makefile.in b/darshan-util/Makefile.in index a217631..4e07e8d 100644 --- a/darshan-util/Makefile.in +++ b/darshan-util/Makefile.in @@ -37,35 +37,35 @@ uthash-1.9.2: tar xjvf $(srcdir)/extern/uthash-1.9.2.tar.bz2 darshan-parser: darshan-parser.c $(DARSHAN_LOG_FORMAT) darshan-logutils.h darshan-logutils.o | uthash-1.9.2 - gcc $(CFLAGS) $< darshan-logutils.o -o $@ $(LIBS) + $(CC) $(CFLAGS) $< darshan-logutils.o -o $@ $(LIBS) darshan-convert: darshan-convert.c $(DARSHAN_LOG_FORMAT) darshan-logutils.h darshan-logutils.o lookup3.o - gcc $(CFLAGS) $< darshan-logutils.o lookup3.o -o $@ $(LIBS) + $(CC) $(CFLAGS) $< darshan-logutils.o lookup3.o -o $@ $(LIBS) darshan-analyzer: darshan-analyzer.c $(DARSHAN_LOG_FORMAT) darshan-logutils.h darshan-logutils.o - gcc $(CFLAGS) $< darshan-logutils.o -o $@ $(LIBS) + $(CC) $(CFLAGS) $< darshan-logutils.o -o $@ $(LIBS) darshan-log-params: darshan-log-params.c $(DARSHAN_LOG_FORMAT) - gcc $(CFLAGS) $< -o $@ $(LIBS) + $(CC) $(CFLAGS) $< -o $@ $(LIBS) jenkins: util/bin/jenkins.o lookup3.o - gcc $(CFLAGS) $< -o $@ lookup3.o $(LIBS) + $(CC) $(CFLAGS) $< -o $@ lookup3.o $(LIBS) darshan-diff: darshan-diff.o $(DARSHAN_LOG_FORMAT) darshan-logutils.o darshan-logutils.h - gcc $(CFLAGS) $< darshan-logutils.o -o $@ $(LIBS) + $(CC) $(CFLAGS) $< darshan-logutils.o -o $@ $(LIBS) darshan-diff.o: darshan-diff.c - gcc $(CFLAGS) -c $< -o $@ + $(CC) $(CFLAGS) -c $< -o $@ darshan-logutils.o: darshan-logutils.c - gcc $(CFLAGS) -c $< -o $@ + $(CC) $(CFLAGS) -c $< -o $@ darshan-util-lib: darshan-logutils.o ar rcs libdarshan-util.a $< test/gztest: test/gztest.c mktestdir - gcc $(CFLAGS) -lz $< -o $@ + $(CC) $(CFLAGS) -lz $< -o $@ test/gz-bench: test/gz-bench.c mktestdir - gcc $(CFLAGS) -lz $< -o $@ + $(CC) $(CFLAGS) -lz $< -o $@ lookup3.o: lookup3.c $(CC) $(CFLAGS) -c $< -o $@ diff --git a/darshan-util/configure b/darshan-util/configure index 177a865..ddfddf8 100755 --- a/darshan-util/configure +++ b/darshan-util/configure @@ -3562,6 +3562,8 @@ fi $as_echo_n "checking zlib in ${ZLIB_HOME}... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } + __CP_ZLIB_LINK_FLAGS="-L${ZLIB_HOME}/lib" + __CP_ZLIB_INCLUDE_FLAGS="-I${ZLIB_HOME}/include" else # # If either header or library was not found, revert and bomb diff --git a/darshan-util/doc/darshan-util.txt b/darshan-util/doc/darshan-util.txt index dc0c340..e903553 100644 --- a/darshan-util/doc/darshan-util.txt +++ b/darshan-util/doc/darshan-util.txt @@ -39,6 +39,15 @@ make make install ---- +CC variable +[NOTE] +The darshan-util package is intended to be used on a login node or +workstation. For most use cases this means that you should +either leave CC to its default setting or specify a local compiler. This is +in contrast to the darshan-runtime documentation, which suggests setting CC +to mpicc because the runtime library will be used in the compute node +environment. + You can specify `--prefix` to install darshan-util in a specific location (such as in your home directory for non-root installations). See `./configure --help` for additional optional arguments, including how to -- 2.26.2