From cc66055f97ef7ecdd77b18487b5c32f8334b8c8b Mon Sep 17 00:00:00 2001 From: Baruch Siach Date: Tue, 10 Apr 2018 23:03:41 +0300 Subject: [PATCH] btrfs-progs: build btrfs.static needs libbtrfsutil to build Add libbtrfsutil objects to btrfs.static link command. This fixes static build failure: utils.static.o: In function `parse_qgroupid': utils.c:(.text.parse_qgroupid+0xb0): undefined reference to `btrfs_util_is_subvolume' props.static.o: In function `prop_read_only': props.c:(.text.prop_read_only+0x70): undefined reference to `btrfs_util_set_subvolume_read_only' ... Makefile:457: recipe for target 'btrfs.static' failed make[1]: *** [btrfs.static] Error 1 Signed-off-by: Baruch Siach Signed-off-by: David Sterba --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 0470f2e0..cbd85533 100644 --- a/Makefile +++ b/Makefile @@ -257,6 +257,7 @@ endif static_objects = $(patsubst %.o, %.static.o, $(objects)) static_cmds_objects = $(patsubst %.o, %.static.o, $(cmds_objects)) static_libbtrfs_objects = $(patsubst %.o, %.static.o, $(libbtrfs_objects)) +static_libbtrfsutil_objects = $(patsubst %.o, %.static.o, $(libbtrfsutil_objects)) static_convert_objects = $(patsubst %.o, %.static.o, $(convert_objects)) static_mkfs_objects = $(patsubst %.o, %.static.o, $(mkfs_objects)) static_image_objects = $(patsubst %.o, %.static.o, $(image_objects)) @@ -449,7 +450,7 @@ btrfs: btrfs.o $(objects) $(cmds_objects) $(libs_static) @echo " [LD] $@" $(Q)$(CC) -o $@ $^ $(LDFLAGS) $(LIBS) $(LIBS_COMP) -btrfs.static: btrfs.static.o $(static_objects) $(static_cmds_objects) $(static_libbtrfs_objects) +btrfs.static: btrfs.static.o $(static_objects) $(static_cmds_objects) $(static_libbtrfs_objects) $(static_libbtrfsutil_objects) @echo " [LD] $@" $(Q)$(CC) -o $@ $^ $(STATIC_LDFLAGS) $(STATIC_LIBS) $(STATIC_LIBS_COMP)