erofs-utils: enhance static linking for lz4 1.8.x

Since LZ4_compress_HC_destSize is static linking only on lz4 < 1.9.0,
but usually both lz4 static and dynamic libraries are available.

Previously, -all-static is used in erofs-utils compilation for such
lz4 versions, but it has conficts with libselinux linking. Use another
workable way [1] I've found instead.

[1] https://stackoverflow.com/questions/8045707/how-to-link-to-the-libabc-a-instead-of-libabc-so
Reviewed-and-tested-by: Li Guifu <bluce.lee@aliyun.com>
Link: https://lore.kernel.org/r/20200531034510.5019-1-hsiangkao@aol.com
Signed-off-by: Gao Xiang <hsiangkao@redhat.com>
2 files changed