btrfs-progs: build: link against local libraries
authorDavid Sterba <dsterba@suse.com>
Thu, 24 Nov 2016 10:30:06 +0000 (11:30 +0100)
committerDavid Sterba <dsterba@suse.com>
Thu, 24 Nov 2016 12:06:36 +0000 (13:06 +0100)
If there's a system provided libbtrfs.0, it will be used for the
library-test build and could miss linker errors, as reported.

Reported-by: Mike Gilbert <floppymaster@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Makefile.in

index 79dfcf5..240df7a 100644 (file)
@@ -73,7 +73,7 @@ CFLAGS = @CFLAGS@ \
         $(EXTRA_CFLAGS)
 
 LDFLAGS = @LDFLAGS@ \
-         -rdynamic $(EXTRA_LDFLAGS)
+         -rdynamic -L$(TOPDIR) $(EXTRA_LDFLAGS)
 
 LIBS = @UUID_LIBS@ @BLKID_LIBS@ @ZLIB_LIBS@ @LZO2_LIBS@ -L. -pthread
 LIBBTRFS_LIBS = $(LIBS)