mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-09-19 16:40:46 -09:00
package/zstd: Prefer dynamically linked tool
If the libzstd DSO is available, then link the tool against it. Signed-off-by: Norbert Lange <nolange79@gmail.com> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
This commit is contained in:
committed by
Arnout Vandecappelle (Essensium/Mind)
parent
0f0e913f10
commit
32041f050e
@@ -49,6 +49,13 @@ ZSTD_BUILD_LIBS = lib
|
|||||||
ZSTD_INSTALL_LIBS = install-static install-shared
|
ZSTD_INSTALL_LIBS = install-static install-shared
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# prefer zstd-dll unless no library is available
|
||||||
|
ifeq ($(BR2_STATIC_LIBS),y)
|
||||||
|
ZSTD_BUILD_PROG_TARGET = zstd-release
|
||||||
|
else
|
||||||
|
ZSTD_BUILD_PROG_TARGET = zstd-dll
|
||||||
|
endif
|
||||||
|
|
||||||
# The HAVE_THREAD flag is read by the 'programs' makefile but not by the 'lib'
|
# The HAVE_THREAD flag is read by the 'programs' makefile but not by the 'lib'
|
||||||
# one. Building a multi-threaded binary with a static library (which defaults
|
# one. Building a multi-threaded binary with a static library (which defaults
|
||||||
# to single-threaded) gives a runtime error when compressing files.
|
# to single-threaded) gives a runtime error when compressing files.
|
||||||
@@ -68,7 +75,7 @@ define ZSTD_BUILD_CMDS
|
|||||||
$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) $(ZSTD_OPTS) \
|
$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) $(ZSTD_OPTS) \
|
||||||
-C $(@D)/lib $(ZSTD_BUILD_LIBS) libzstd.pc
|
-C $(@D)/lib $(ZSTD_BUILD_LIBS) libzstd.pc
|
||||||
$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) $(ZSTD_OPTS) \
|
$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) $(ZSTD_OPTS) \
|
||||||
-C $(@D) zstd-release
|
-C $(@D)/programs $(ZSTD_BUILD_PROG_TARGET)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define ZSTD_INSTALL_STAGING_CMDS
|
define ZSTD_INSTALL_STAGING_CMDS
|
||||||
|
|||||||
Reference in New Issue
Block a user