package/zstd: build multithreaded host-zstd

Under the assumption that all Buildroot build hosts nowadays are
multithreaded, we can boost performance of host-zstd by enabling
multithreaded operation.

See also commit 52154e5206.

Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
Thomas De Schampheleire 2021-01-18 21:37:52 +01:00 committed by Thomas Petazzoni
parent 7e2d5aa2d6
commit e3110b3c63

View File

@ -76,18 +76,20 @@ define ZSTD_INSTALL_TARGET_CMDS
DESTDIR=$(TARGET_DIR) PREFIX=/usr -C $(@D)/lib $(ZSTD_INSTALL_LIBS)
endef
# note: no 'HAVE_...' options for host library build only
# note: only limited 'HAVE_...' options for host library build only
HOST_ZSTD_OPTS = HAVE_THREAD=1
define HOST_ZSTD_BUILD_CMDS
$(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) \
-C $(@D)/lib libzstd.a libzstd
$(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) \
$(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) $(HOST_ZSTD_OPTS) \
-C $(@D)/lib libzstd.a-mt libzstd-mt
$(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) $(HOST_ZSTD_OPTS) \
-C $(@D) zstd
endef
define HOST_ZSTD_INSTALL_CMDS
$(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) \
$(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) $(HOST_ZSTD_OPTS) \
DESTDIR=$(HOST_DIR) PREFIX=/usr -C $(@D)/lib install
$(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) \
$(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) $(HOST_ZSTD_OPTS) \
DESTDIR=$(HOST_DIR) PREFIX=/usr -C $(@D)/programs install
endef