diff options
author | Gao Xiang <hsiangkao@redhat.com> | 2020-10-30 20:30:17 +0800 |
---|---|---|
committer | Gao Xiang <hsiangkao@redhat.com> | 2020-11-01 23:44:29 +0800 |
commit | 10d529afab6e708a7aeaceb1fc0bfba6668fa9d6 (patch) | |
tree | d217cfb88a02c3922654c811482afa511c5d671d | |
parent | ef1c0a261ba1b487c6a87226dad2aeb6bb15458a (diff) |
erofs-utils: fix build error without lz4 library
This fixes a recent build error if lz4 library doesn't install,
/bin/sh ../libtool --tag=CC --mode=link gcc -Wall -Werror -I../include -g -O2 -o mkfs.erofs mkfs_erofs-main.o -luuid ../lib/liberofs.la -llz4
libtool: link: gcc -Wall -Werror -I../include -g -O2 -o mkfs.erofs mkfs_erofs-main.o -luuid ../lib/.libs/liberofs.a -llz4
/usr/bin/ld: cannot find -llz4
Link: https://lore.kernel.org/r/20201030123020.133084-1-hsiangkao@redhat.com
Fixes: c497d89e5eac ("erofs-utils: enhance static linking for lz4 1.8.x")
Reviewed-by: Li Guifu <bluce.lee@aliyun.com>
Signed-off-by: Gao Xiang <hsiangkao@redhat.com>
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | mkfs/Makefile.am | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 0f40a84..bff1e29 100644 --- a/configure.ac +++ b/configure.ac @@ -240,7 +240,9 @@ if test "x${have_lz4}" = "xyes"; then else test -z "${with_lz4_libdir}" || LZ4_LIBS="-R${with_lz4_libdir} $LZ4_LIBS" fi + liblz4_LIBS="${LZ4_LIBS}" fi +AC_SUBST([liblz4_LIBS]) AC_CONFIG_FILES([Makefile man/Makefile diff --git a/mkfs/Makefile.am b/mkfs/Makefile.am index ecc468c..8b8e051 100644 --- a/mkfs/Makefile.am +++ b/mkfs/Makefile.am @@ -6,5 +6,5 @@ bin_PROGRAMS = mkfs.erofs AM_CPPFLAGS = ${libuuid_CFLAGS} ${libselinux_CFLAGS} mkfs_erofs_SOURCES = main.c mkfs_erofs_CFLAGS = -Wall -Werror -I$(top_srcdir)/include -mkfs_erofs_LDADD = ${libuuid_LIBS} $(top_builddir)/lib/liberofs.la ${libselinux_LIBS} ${LZ4_LIBS} +mkfs_erofs_LDADD = ${libuuid_LIBS} $(top_builddir)/lib/liberofs.la ${libselinux_LIBS} ${liblz4_LIBS} |