btrfs-progs: build: static should pick up EXTRA_LDFLAGS and SUBST_LDFLAGS
Concrete use-case: - I want a static build to run in a small test VM. - RedHat regrettably does not provide util-linux static libraries - like libuuid.a and libblkid.a. - So, one has to build them from source. - Installing these to /usr is lame. - This change lets me do make btrfs.static EXTRA_LDFLAGS=-L/path/to/util-linux-2.38/.libs Pull-request: #563 Author: Alexey <snarkmaster@gmail.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
54b90cb6e5
commit
3e023b19f8
2
Makefile
2
Makefile
|
@ -134,7 +134,7 @@ LIBBTRFS_LIBS = $(LIBS_BASE) $(LIBS_CRYPTO)
|
||||||
|
|
||||||
# Static compilation flags
|
# Static compilation flags
|
||||||
STATIC_CFLAGS = $(CFLAGS) -ffunction-sections -fdata-sections -DSTATIC_BUILD
|
STATIC_CFLAGS = $(CFLAGS) -ffunction-sections -fdata-sections -DSTATIC_BUILD
|
||||||
STATIC_LDFLAGS = -static -Wl,--gc-sections
|
STATIC_LDFLAGS = $(SUBST_LDFLAGS) $(EXTRA_LDFLAGS) -static -Wl,--gc-sections
|
||||||
STATIC_LIBS = $(STATIC_LIBS_BASE)
|
STATIC_LIBS = $(STATIC_LIBS_BASE)
|
||||||
|
|
||||||
# don't use FORTIFY with sparse because glibc with FORTIFY can
|
# don't use FORTIFY with sparse because glibc with FORTIFY can
|
||||||
|
|
Loading…
Reference in New Issue