* [Buildroot] [git commit branch/next] package/zstd: Prefer dynamically linked tool
@ 2021-08-05 20:20 Arnout Vandecappelle
0 siblings, 0 replies; only message in thread
From: Arnout Vandecappelle @ 2021-08-05 20:20 UTC (permalink / raw)
To: buildroot
commit: https://git.buildroot.net/buildroot/commit/?id=32041f050e42ac15af463622274a889ff8d044ed
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/next
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>
---
package/zstd/zstd.mk | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/package/zstd/zstd.mk b/package/zstd/zstd.mk
index 9c97eb0e11..e970d87cbf 100644
--- a/package/zstd/zstd.mk
+++ b/package/zstd/zstd.mk
@@ -49,6 +49,13 @@ ZSTD_BUILD_LIBS = lib
ZSTD_INSTALL_LIBS = install-static install-shared
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'
# one. Building a multi-threaded binary with a static library (which defaults
# 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) \
-C $(@D)/lib $(ZSTD_BUILD_LIBS) libzstd.pc
$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) $(ZSTD_OPTS) \
- -C $(@D) zstd-release
+ -C $(@D)/programs $(ZSTD_BUILD_PROG_TARGET)
endef
define ZSTD_INSTALL_STAGING_CMDS
_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-08-05 20:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-05 20:20 [Buildroot] [git commit branch/next] package/zstd: Prefer dynamically linked tool Arnout Vandecappelle
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.