From: Pedro Alves Date: Thu, 7 Jan 2010 03:28:21 +0000 (-0500) Subject: Remove absolute path from libust.so X-Git-Tag: v0.1~24 X-Git-Url: https://git.lttng.org/?p=ust.git;a=commitdiff_plain;h=23ae9ca88799109e397a7eb88f06e4bae6f97ae2 Remove absolute path from libust.so I noticed that the libust.so ld script is installed to the same directory as libust.so.0 and libust-initializer.o, so removing the absolute paths from them allows linking with a libust.so that isn't in the sysroot or installed under /usr/, like e.g., in a DESTDIR directory. This was useful for testing a release with everything extracted some randome prefix, e.g., libust.so in $RANDOM_UNPACK_DIR/usr/lib, and pointing LD_LIBRARY_PATH to $RANDOM_UNPACK_DIR/usr/lib. --- diff --git a/Makefile.am b/Makefile.am index 9385116..3f23249 100644 --- a/Makefile.am +++ b/Makefile.am @@ -16,7 +16,7 @@ ldscripts_DATA = libust.so libust-initializer.o CLEANFILES = $(ldscripts_DATA) ./tests/libust-initializer.Po libust.so: libust.ldscript.in - $(SED) -e "s@\@FORMAT\@@$(LIBFORMAT)@" -e "s@\@PATH\@@${libdir}@g" < $< > $@ + $(SED) -e "s@\@FORMAT\@@$(LIBFORMAT)@" < $< > $@ # It is very important to compile the initializer with PIC otherwise we # may get obscure errors when linking to shared libraries. diff --git a/libust.ldscript.in b/libust.ldscript.in index 3babac6..d3f9fe8 100644 --- a/libust.ldscript.in +++ b/libust.ldscript.in @@ -1,4 +1,4 @@ /* GNU ld script Use the shared library, but the link with initializer too */ OUTPUT_FORMAT(@FORMAT@) -GROUP ( @PATH@/libust.so.0 @PATH@/libust-initializer.o ) +GROUP ( libust.so.0 libust-initializer.o )