1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
# Basic test of $ORIGIN interpolation in rpath & runpath.
.PHONY: clean
LD_LIBRARY_PATH=
all: check
liba.so:
echo 'int f(){return 1;}' | $(CC) -shared -Wl,-soname,$@ -o $@ -nostdlib -x c -
exe_rpath: liba.so
echo 'int _start(){return f();}' | $(CC) -o $@ -Wl,--no-as-needed -Wl,--disable-new-dtags '-Wl,-rpath,$$ORIGIN' -Wno-implicit-function-declaration -nostdlib liba.so -x c -
exe_runpath: liba.so
echo 'int _start(){return f();}' | $(CC) -o $@ -Wl,--no-as-needed -Wl,--enable-new-dtags '-Wl,-rpath,$$ORIGIN' -Wno-implicit-function-declaration -nostdlib liba.so -x c -
check: exe_rpath exe_runpath
../../libtree exe_rpath
../../libtree exe_runpath
clean:
rm -f *.so exe*
|