diff options
authorDavid Sterba <>2015-02-04 18:45:54 +0100
committerDavid Sterba <>2015-02-04 18:45:54 +0100
commit4aa32c9debfafad68fd39bce8702b8624f287acd (patch)
parent779499a9addb90fa38597bba98523b1717982845 (diff)
btrfs-progs: build, use the static library for the utilities
Commit 2c2e6c4e12e5af15fd ("btrfs-progs: autoconf: cleanup compilation flags usage") added the shared library to the linking command so the resulting binaries depend dependent on This is not intended. Reported-by: WorMzy Tykashi <> Signed-off-by: David Sterba <>
1 files changed, 8 insertions, 8 deletions
diff --git a/ b/
index bd6fc349..f3da51d8 100644
--- a/
+++ b/
@@ -202,15 +202,15 @@ btrfs-%.static: $(static_objects) btrfs-%.static.o $(static_libbtrfs_objects)
$(static_libbtrfs_objects) $(STATIC_LDFLAGS) \
$($(subst -,_,$(subst .static,,$@)-libs)) $(STATIC_LIBS)
-btrfs-%: $(objects) $(libs) btrfs-%.o
+btrfs-%: $(objects) $(libs_static) btrfs-%.o
@echo " [LD] $@"
- $(Q)$(CC) $(CFLAGS) -o $@ $(objects) $@.o $(libs) \
+ $(Q)$(CC) $(CFLAGS) -o $@ $(objects) $@.o $(libs_static) \
$(LDFLAGS) $(LIBS) $($(subst -,_,$@-libs))
-btrfs: $(objects) btrfs.o help.o $(cmds_objects) $(libs)
+btrfs: $(objects) btrfs.o help.o $(cmds_objects) $(libs_static)
@echo " [LD] $@"
$(Q)$(CC) $(CFLAGS) -o btrfs btrfs.o help.o $(cmds_objects) \
- $(objects) $(libs) $(LDFLAGS) $(LIBS)
+ $(objects) $(libs_static) $(LDFLAGS) $(LIBS)
btrfs.static: $(static_objects) btrfs.static.o help.static.o $(static_cmds_objects) $(static_libbtrfs_objects)
@echo " [LD] $@"
@@ -226,18 +226,18 @@ btrfsck.static: btrfs.static
@echo " [LN] $@"
$(Q)$(LN_S) -f $^ $@
-mkfs.btrfs: $(objects) $(libs) mkfs.o
+mkfs.btrfs: $(objects) $(libs_static) mkfs.o
@echo " [LD] $@"
- $(Q)$(CC) $(CFLAGS) -o mkfs.btrfs $(objects) $(libs) mkfs.o $(LDFLAGS) $(LIBS)
+ $(Q)$(CC) $(CFLAGS) -o mkfs.btrfs $(objects) $(libs_static) mkfs.o $(LDFLAGS) $(LIBS)
mkfs.btrfs.static: $(static_objects) mkfs.static.o $(static_libbtrfs_objects)
@echo " [LD] $@"
$(Q)$(CC) $(STATIC_CFLAGS) -o mkfs.btrfs.static mkfs.static.o $(static_objects) \
$(static_libbtrfs_objects) $(STATIC_LDFLAGS) $(STATIC_LIBS)
-btrfstune: $(objects) $(libs) btrfstune.o
+btrfstune: $(objects) $(libs_static) btrfstune.o
@echo " [LD] $@"
- $(Q)$(CC) $(CFLAGS) -o btrfstune $(objects) $(libs) btrfstune.o $(LDFLAGS) $(LIBS)
+ $(Q)$(CC) $(CFLAGS) -o btrfstune $(objects) btrfstune.o $(libs_static) $(LDFLAGS) $(LIBS)
btrfstune.static: $(static_objects) btrfstune.static.o $(static_libbtrfs_objects)
@echo " [LD] $@"