btrfs-progs/mkfs
David Sterba bd4a386ec5 btrfs-progs: build most common tools into one binary (busybox style)
Build several standalone tools into one binary and switch the function
by name (symlink or hardlink).

* btrfs
* mkfs.btrfs
* btrfs-image
* btrfs-convert
* btrfstune

The static target is also supported. The name of resulting boxed
binaries is btrfs.box and btrfs.box.static . All the binaries can be
built at the same time without prior configuration.

   text    data     bss     dec     hex filename
 822454   27000   19724  869178   d433a btrfs
 927314   28816   20812  976942   ee82e btrfs.box
2067745   58004   44736 2170485  211e75 btrfs.static
2627198   61724   83800 2772722  2a4ef2 btrfs.box.static

File sizes:

  857496  btrfs
  968536  btrfs.box
 2141400  btrfs.static
 2704472  btrfs.box.static

Standalone utilities:

  512504  btrfs-convert
  495960  btrfs-image
  471224  btrfstune
  491864  mkfs.btrfs

 1747720  btrfs-convert.static
 1411416  btrfs-image.static
 1304256  btrfstune.static
 1361696  mkfs.btrfs.static

So the shared 900K binary saves ~2M, or ~5.7M for static build.

Signed-off-by: David Sterba <dsterba@suse.cz>
2019-07-04 15:30:40 +02:00
..
common.c btrfs-progs: utils: split device handling functions to own file 2019-07-04 02:06:34 +02:00
common.h btrfs-progs: mkfs: Fix typos in strings and comments 2018-06-07 16:37:40 +02:00
main.c btrfs-progs: build most common tools into one binary (busybox style) 2019-07-04 15:30:40 +02:00
rootdir.c btrfs-progs: move utils.[ch] to common/ 2019-07-03 20:49:04 +02:00
rootdir.h btrfs-progs: mkfs/rootdir: Fix memory leak in traverse_directory() 2018-02-14 16:31:19 +01:00