From 9751733e53afdf16a3b6ff5345b4b8e4d3e35f64 Mon Sep 17 00:00:00 2001 From: Luke Robison Date: Wed, 17 Apr 2024 20:14:42 +0000 Subject: [PATCH] Add binutils paths and rpaths Signed-off-by: Luke Robison --- src/configure | 2 ++ src/makefile.in | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/configure b/src/configure index 08a7943..b5d4d3a 100755 --- a/src/configure +++ b/src/configure @@ -217,6 +217,8 @@ if [ $vprof_flag == 1 ]; then echo -n testing for binutils config.h... if [ -f $binutils_path/include/config.h ]; then echo found + elif [ -f $binutils_path/include/extra/config.h ]; then + echo found else echo binutils config.h not found ... check your binutils path ... exiting exit diff --git a/src/makefile.in b/src/makefile.in index 5110d5c..bf37577 100644 --- a/src/makefile.in +++ b/src/makefile.in @@ -6,7 +6,7 @@ ifeq ($(VPROF),-DVPROF) VPROF_STATIC_OBJ = vprof_static.o VPROF_DYNAMIC_OBJ = vprof_bfd.o - BFD_LIB = -L BINUTILS_INSTALL_PATH/lib -lbfd -L BINUTILS_INSTALL_PATH/lib64 -liberty -lz + BFD_LIB = -Wl,-rpath=BINUTILS_INSTALL_PATH/lib64 -Wl,-rpath=BINUTILS_INSTALL_PATH/lib -L BINUTILS_INSTALL_PATH/lib -L BINUTILS_INSTALL_PATH/lib64 -lbfd -liberty -lz else VPROF_OBJ = BFD_LIB = @@ -91,8 +91,8 @@ hpm.o : hpm.c counters.h $(CC) -c $(CFLAGS) $(UNCORE) -DUSE_MPI $(PAPI_INC) hpm.c -o $@ vprof_static.o : ../vprof/vprof_static.c - $(CC) -c $(CFLAGS) -I BINUTILS_INSTALL_PATH/include ../vprof/vprof_static.c -o $@ - + $(CC) -c $(CFLAGS) -I BINUTILS_INSTALL_PATH/include -I BINUTILS_INSTALL_PATH/include/extra ../vprof/vprof_static.c -o $@ + vprof_bfd.o : ../vprof/vprof_bfd.c - $(CC) -c $(CFLAGS) -I BINUTILS_INSTALL_PATH/include ../vprof/vprof_bfd.c -o $@ + $(CC) -c $(CFLAGS) -I BINUTILS_INSTALL_PATH/include -I BINUTILS_INSTALL_PATH/include/extra ../vprof/vprof_bfd.c -o $@