btrfs-progs: tests: add correct rpath to library-test

Our library-test dynamically linked binary was not using the built
libbtrfs. To fix that, use -rpath.

Reported-by: Mike Gilbert <floppymaster@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba 2016-11-30 12:34:17 +01:00
parent 9d133083aa
commit 18b1364e68
1 changed files with 1 additions and 1 deletions

View File

@ -445,7 +445,7 @@ test-ioctl: ioctl-test ioctl-test-32 ioctl-test-64
library-test: $(libs_shared) library-test.o
@echo " [LD] $@"
$(Q)$(CC) $(CFLAGS) -o library-test library-test.o $(LDFLAGS) -lbtrfs
$(Q)$(CC) $(CFLAGS) -o library-test library-test.o $(LDFLAGS) -Wl,-rpath=$(TOPDIR) -lbtrfs
@echo " [TEST] $@"
$(Q)./$@