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.
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.
/* 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 )