From patchwork Tue May 25 17:26:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Norbert Lange X-Patchwork-Id: 1483666 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.137; helo=smtp4.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=dCTqy24r; dkim-atps=neutral Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FqLcC6cfTz9sPf for ; Wed, 26 May 2021 03:27:07 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id CC8E240551; Tue, 25 May 2021 17:27:05 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ntxa1Q23Oc4r; Tue, 25 May 2021 17:27:04 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp4.osuosl.org (Postfix) with ESMTP id E4B5F40529; Tue, 25 May 2021 17:27:03 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 4348D1BF57B for ; Tue, 25 May 2021 17:27:02 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 32F4A83C6C for ; Tue, 25 May 2021 17:27:02 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp1.osuosl.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id y417qjlscifl for ; Tue, 25 May 2021 17:27:01 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) by smtp1.osuosl.org (Postfix) with ESMTPS id 3E26C83BDE for ; Tue, 25 May 2021 17:27:01 +0000 (UTC) Received: by mail-ej1-x62c.google.com with SMTP id gb17so30531915ejc.8 for ; Tue, 25 May 2021 10:27:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=FgexIksFfxHqS6PAyxOFHziAIYsqow63XpztWpMIVpA=; b=dCTqy24rQwLZnXmOaiprtqmXZ5sRdavK8oDzJCq6jm3JSgzJBkq+wC/jyWmpc/bjxj MLfnXKfk2LVfCZ8LNIKmSoKsMp3Tr+QgEVHchmR2b5+2unqPaoZJgpGUx7ae3/AHja1G ENud9VPBIE7RCLXyVeZ+G4zlJrdHP8kU6JPIJ/7shfnw8xn4ReK+uhxujSlh6YUMFWmG XdLp4Pi/+lkCSHc7nAsRWtHWAyU+KkNKOpmh8v0sfWzijqI1t+wP1n27gKajBotLKM3R RxHdvsw0nFK5etZuklcFGyzGeNdc//AXNqV8Lx3/qRgab6gED12gM+na6XjX423MTVqT kDww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=FgexIksFfxHqS6PAyxOFHziAIYsqow63XpztWpMIVpA=; b=airRmrfAg0GLdpmdQIp5SlNm1ryrPfNgxrKyYePesWbp6341ugi9cYALApc3D7IPPz PU0M5gHmxv9U2U7eZUe/o1N0/YkArI4NdwSfDPxfZafuGC+7Uppe0ANwI9X2CsZ9khPW tCncB3xYPvZX/ZXHYCWHgs4GaknjRUlnjG5lpkQY/DyhC2uRz1CF5IxXs1QxG488HYmZ pWwXO0/wI+v/IHIga6POTJwuKxGfOzNtCQL72Nnva7BBmdwqbHtsXD4q4w0ld6yp/LEa qZ0QG/9BMa9zmgxUmLe4vJ0kEtlojKuGZL/cfJMXetX45NYg/peukI1Wo3qTJttGHxRy M6Yg== X-Gm-Message-State: AOAM531BLOW4gNcyPdPv+ca3TShBDFZf8LIViH3SVmzqbOFhdhFUplwj gDPIgByum1xF2NIgQKSqLE1LD/Dbsp/n9w== X-Google-Smtp-Source: ABdhPJzo4uTw1cMRjICKmGVwtbokirlvGRtrGhNiv7cdbItELvgskxuWduRVF7DjWFcizQBIQBWDwg== X-Received: by 2002:a17:906:af70:: with SMTP id os16mr28277623ejb.201.1621963619553; Tue, 25 May 2021 10:26:59 -0700 (PDT) Received: from debian-noppl.. (84-114-45-16.cable.dynamic.surfer.at. [84.114.45.16]) by smtp.gmail.com with ESMTPSA id w10sm9333204ejq.48.2021.05.25.10.26.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 May 2021 10:26:59 -0700 (PDT) From: Norbert Lange To: buildroot@buildroot.org Date: Tue, 25 May 2021 19:26:47 +0200 Message-Id: <20210525172652.821351-1-nolange79@gmail.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Subject: [Buildroot] [PATCH v2 1/5] package/zstd: bump to version 1.5.0 X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrey Smirnov , Norbert Lange Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Signed-off-by: Norbert Lange --- package/zstd/zstd.hash | 4 ++-- package/zstd/zstd.mk | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package/zstd/zstd.hash b/package/zstd/zstd.hash index a979501e5f..2d7bf37b2a 100644 --- a/package/zstd/zstd.hash +++ b/package/zstd/zstd.hash @@ -1,5 +1,5 @@ -# From https://github.com/facebook/zstd/releases/download/v1.4.9/zstd-1.4.9.tar.gz.sha256 -sha256 29ac74e19ea28659017361976240c4b5c5c24db3b89338731a6feb97c038d293 zstd-1.4.9.tar.gz +# From https://github.com/facebook/zstd/releases/download/v1.5.0/zstd-1.5.0.tar.gz.sha256 +sha256 5194fbfa781fcf45b98c5e849651aa7b3b0a008c6b72d4a0db760f3002291e94 zstd-1.5.0.tar.gz # License files (locally computed) sha256 2c1a7fa704df8f3a606f6fc010b8b5aaebf403f3aeec339a12048f1ba7331a0b LICENSE diff --git a/package/zstd/zstd.mk b/package/zstd/zstd.mk index 63ea8b1b35..194974147c 100644 --- a/package/zstd/zstd.mk +++ b/package/zstd/zstd.mk @@ -4,7 +4,7 @@ # ################################################################################ -ZSTD_VERSION = 1.4.9 +ZSTD_VERSION = 1.5.0 ZSTD_SITE = https://github.com/facebook/zstd/releases/download/v$(ZSTD_VERSION) ZSTD_INSTALL_STAGING = YES ZSTD_LICENSE = BSD-3-Clause or GPL-2.0 From patchwork Tue May 25 17:26:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Norbert Lange X-Patchwork-Id: 1483667 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=2605:bc80:3010::136; helo=smtp3.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=q7SoMgbk; dkim-atps=neutral Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FqLcT5CJYz9sPf for ; Wed, 26 May 2021 03:27:21 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 088CF60B24; Tue, 25 May 2021 17:27:19 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wqakevmNoEcd; Tue, 25 May 2021 17:27:18 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id 5C7B360B21; Tue, 25 May 2021 17:27:17 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 5E7DB1BF57B for ; Tue, 25 May 2021 17:27:03 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 5AACF60B21 for ; Tue, 25 May 2021 17:27:03 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0UFgp16tUC8O for ; Tue, 25 May 2021 17:27:02 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) by smtp3.osuosl.org (Postfix) with ESMTPS id 9F13A60B1E for ; Tue, 25 May 2021 17:27:02 +0000 (UTC) Received: by mail-ed1-x531.google.com with SMTP id j10so19635240edw.8 for ; Tue, 25 May 2021 10:27:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=UcR/O6H1GaDl04XS/aTa2irUkfKeczZAhVIXljSrvPA=; b=q7SoMgbkFyN4hxHSSADyn2S1z4YnkmSKJSkMvhb2DRqh75feRPIhzIetd1f5xzTvYz EZlFtC5gxAvSophXaxR4RCnVcXWs9KvsANhuWokNhy1DVZ912KObyhKHF1praOrQHg86 t6BcCEKHA2iGgarLWhUq1JkBS86VwvHSq8W26giu5veJ6y+iccqrghOvJZvzuFT4ir3U WSw0lnXWyDBiycUWTUVkpx+VwY0Q82NobJ5B+p6D8dQLTvMh3KVtLuQssUWH/Ca48wkt TJiPFzx83VwnuEVD2t/B899y0qobJxhiZnTSm3osdbMqq6HcXYBJFvIerS3Dbxoqdx+e kkHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=UcR/O6H1GaDl04XS/aTa2irUkfKeczZAhVIXljSrvPA=; b=BD1gFUCDPKTCNhQsOQop7zOwWCUjJIKlzP9rG3mzerKY/SD0NK6DRhE64B19KjdSMw 4i5u0ZjYj78hLvJXDPZRwhUgNZMNDnyMoFe2J1vLRbrv9l+gxaqcvwyijb0tX8QhO4Xp g8RMBS5CUGEP8FXVp1QnmT8VIjAgyh4HmiY79/BIIfPWX1WrDxj1x7B/5+Q7S8ipULwJ dzT96ng6+EILKR0yoUjo4Ye9SfVpG8XdYlD2RWrvbTnMVTjsc79tBFLhFoaKhs95pWM4 XCVGY12mSr8Of5dAhnvTqcmQGCWAkDzbB+umM6uaKq0lbdvYrefbesE+2fWTXXpS+lCC poPQ== X-Gm-Message-State: AOAM5300XwVggNghBdkqlYY6/FJ6F5SLa49UgzSDTzgitxSYsxA1AEr0 WWEmeeF7jbp+1SLssfpfZC47BXI6G6T+HQ== X-Google-Smtp-Source: ABdhPJytJOT+b9m1cikQp5kJjDXXhnMJY+YKENpa17elc3/UpOcUnCgRHZcha7QFbqIC0/OAafbWhw== X-Received: by 2002:aa7:d801:: with SMTP id v1mr33373013edq.349.1621963620955; Tue, 25 May 2021 10:27:00 -0700 (PDT) Received: from debian-noppl.. (84-114-45-16.cable.dynamic.surfer.at. [84.114.45.16]) by smtp.gmail.com with ESMTPSA id w10sm9333204ejq.48.2021.05.25.10.27.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 May 2021 10:27:00 -0700 (PDT) From: Norbert Lange To: buildroot@buildroot.org Date: Tue, 25 May 2021 19:26:48 +0200 Message-Id: <20210525172652.821351-2-nolange79@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210525172652.821351-1-nolange79@gmail.com> References: <20210525172652.821351-1-nolange79@gmail.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH v2 2/5] package/zstd: Simplify host-build X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrey Smirnov , Norbert Lange Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" 1.5.0 uses Threads by default for cli tool and DSO, should not be necessary to do anything special. Signed-off-by: Norbert Lange --- package/zstd/zstd.mk | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/package/zstd/zstd.mk b/package/zstd/zstd.mk index 194974147c..2a876376a2 100644 --- a/package/zstd/zstd.mk +++ b/package/zstd/zstd.mk @@ -78,21 +78,16 @@ define ZSTD_INSTALL_TARGET_CMDS DESTDIR=$(TARGET_DIR) PREFIX=/usr -C $(@D)/lib $(ZSTD_INSTALL_LIBS) endef -# note: only limited 'HAVE_...' options for host library build only -HOST_ZSTD_OPTS = HAVE_THREAD=1 +HOST_ZSTD_OPTS += PREFIX=$(HOST_DIR) define HOST_ZSTD_BUILD_CMDS $(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 + -C $(@D) zstd-release lib-release endef define HOST_ZSTD_INSTALL_CMDS $(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_ZSTD_OPTS) \ - DESTDIR=$(HOST_DIR) PREFIX=/usr -C $(@D)/programs install + -C $(@D) install endef $(eval $(generic-package)) From patchwork Tue May 25 17:26:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Norbert Lange X-Patchwork-Id: 1483668 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=2605:bc80:3010::133; helo=smtp2.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=Pb5VN4CZ; dkim-atps=neutral Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FqLck0msGz9sPf for ; Wed, 26 May 2021 03:27:33 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 93FB740486; Tue, 25 May 2021 17:27:31 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 77iu-Cv78RAG; Tue, 25 May 2021 17:27:30 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp2.osuosl.org (Postfix) with ESMTP id D15CB4045B; Tue, 25 May 2021 17:27:29 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 20C001BF57B for ; Tue, 25 May 2021 17:27:05 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 0FAD460B21 for ; Tue, 25 May 2021 17:27:05 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp3.osuosl.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jUYajykGqxcH for ; Tue, 25 May 2021 17:27:04 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 Received: from mail-ed1-x52e.google.com (mail-ed1-x52e.google.com [IPv6:2a00:1450:4864:20::52e]) by smtp3.osuosl.org (Postfix) with ESMTPS id 2069660B1E for ; Tue, 25 May 2021 17:27:04 +0000 (UTC) Received: by mail-ed1-x52e.google.com with SMTP id t15so37217234edr.11 for ; Tue, 25 May 2021 10:27:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=OLuk9r5c0w86dtJ89yfEoaN93c8gXxyEiDPgDosm2ag=; b=Pb5VN4CZOW4rMC1ha7OfQFufV/hBcjQ8eY5Cyn3XI2SKMsRxA8pyDdqGRn+oggrljV GrrrAwfQxytWVyLv5mJwmANxpe/iY6vW8nXYaToSnoahTdgUM79tX1ygVyEBM3UcS2F9 dZ9IIIWs1VRSFHXetmGF7XOcC0jdW9rw/toDYw6jXvCcJuZnNguY47tXVChXpVPW0V3Z P4lZnum2GAwDQutMm76n6GJY+YMhiKh8yEQrR6fzHeMB+HaXIAwqHyLqFHcdWSOcN8gv 7/s6cjt4L2tEXYdiOlIW7LTqoNUjnyxBaKambaruW4GxfpJ/5wG6oNLb9STt3vGJAO1z eppw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=OLuk9r5c0w86dtJ89yfEoaN93c8gXxyEiDPgDosm2ag=; b=scGt53YfXz2gecqQ91WxD449APEG7hMocH05NvgmLcj+kbevDxTMIKN7+Hcwly+PTN WSS4z9LGsjUICFyGot11s9T4OH6g+pLq6iFmjkf0wKGxB4YmRCL6Yw8i/UfZABVE1UE5 bNMqQa/HqpCKnsBEfE3PSUHQbXqH4fB5BsVd2C20RgjLjHprFJousmBiAvBeEU5cZfhe ZpuKdu0GyfmS1reBb2bTgWMMvvi1TZpl0LJkTOi3AH14W+OruycUMBm09ElXYrSsl9jQ k21bDobfwNTvcLSqYK7zQsh9BNgXzUw8LUo9Z6ImdqCPiPgUR6bi6aydO2rIsLw6F1OU Ouiw== X-Gm-Message-State: AOAM532bUE4SmR797nItVOePflEgVMDJMHxbzaMW3WrTOmPLhj3okFVk zaL8ig3QTa/KCaEw73mKIi0Jpsl2+LbiaA== X-Google-Smtp-Source: ABdhPJyKY0M9vVBDDeArHinNAWKNKe+2k35kk6voxXfXgeyYon/1OEEmluyeDrzcHiP2zVZUNNZJtA== X-Received: by 2002:aa7:d890:: with SMTP id u16mr33137325edq.49.1621963622410; Tue, 25 May 2021 10:27:02 -0700 (PDT) Received: from debian-noppl.. (84-114-45-16.cable.dynamic.surfer.at. [84.114.45.16]) by smtp.gmail.com with ESMTPSA id w10sm9333204ejq.48.2021.05.25.10.27.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 May 2021 10:27:02 -0700 (PDT) From: Norbert Lange To: buildroot@buildroot.org Date: Tue, 25 May 2021 19:26:49 +0200 Message-Id: <20210525172652.821351-3-nolange79@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210525172652.821351-1-nolange79@gmail.com> References: <20210525172652.821351-1-nolange79@gmail.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH v2 3/5] package/zstd: rework build and install X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrey Smirnov , Norbert Lange Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" 1.5.0 uses Threads by default for cli tool and DSO, the build now does the same unless: If only static libraries are build, then build that library like the DSO is normally built. This should ensure that programs requsting the DSO will always get the multithreaded version. Signed-off-by: Norbert Lange --- v1->v2: * rebased against upstream/master Signed-off-by: Norbert Lange --- package/zstd/zstd.mk | 52 ++++++++++++++++++++++++++++---------------- 1 file changed, 33 insertions(+), 19 deletions(-) diff --git a/package/zstd/zstd.mk b/package/zstd/zstd.mk index 2a876376a2..a7a5ba4e50 100644 --- a/package/zstd/zstd.mk +++ b/package/zstd/zstd.mk @@ -12,6 +12,8 @@ ZSTD_LICENSE_FILES = LICENSE COPYING ZSTD_CPE_ID_VENDOR = facebook ZSTD_CPE_ID_PRODUCT = zstandard +ZSTD_OPTS += PREFIX=/usr + ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y) ZSTD_OPTS += HAVE_THREAD=1 else @@ -39,43 +41,55 @@ else ZSTD_OPTS += HAVE_LZ4=0 endif -ifeq ($(BR2_STATIC_LIBS),y) -ZSTD_BUILD_LIBS = libzstd.a -ZSTD_INSTALL_LIBS = install-static -else ifeq ($(BR2_SHARED_LIBS),y) -ZSTD_BUILD_LIBS = libzstd -ZSTD_INSTALL_LIBS = install-shared +ZSTD_BUILD_PROG_TARGET := zstd-release + +# Since v1.5.0 the dynamic library is built for +# multithreading, while the static library is not. +# +# Keep those defaults, unless Buildroot is not +# providing the dynamic library and the +# static library will be automatically used instead. +ifeq ($(BR2_STATIC_LIBS)$(BR2_SHARED_STATIC_LIBS),y) +ZSTD_INSTALL_LIBS += install-static +ifeq ($(BR2_STATIC_LIBS)$(BR2_TOOLCHAIN_HAS_THREADS),yy) +# Use the static lib as replacement for the mt dynlib +ZSTD_BUILD_LIBS += libzstd.a-mt else -ZSTD_BUILD_LIBS = libzstd.a libzstd -ZSTD_INSTALL_LIBS = install-static install-shared +ZSTD_BUILD_LIBS += libzstd.a-nomt +endif endif -# The HAVE_THREAD flag is read by the 'programs' makefile but not by the 'lib' -# one. Building a multi-threaded binary with a library (which defaults to -# single-threaded) gives a runtime error when compressing files. -# The 'lib' makefile provides specific '%-mt' targets for this purpose. +ifeq ($(BR2_SHARED_LIBS)$(BR2_SHARED_STATIC_LIBS),y) +ZSTD_INSTALL_LIBS += install-shared ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y) -ZSTD_BUILD_LIBS := $(addsuffix -mt,$(ZSTD_BUILD_LIBS)) +ZSTD_BUILD_LIBS += libzstd-mt +else +ZSTD_BUILD_LIBS += libzstd-nomt +endif endif define ZSTD_BUILD_CMDS $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) $(ZSTD_OPTS) \ - -C $(@D)/lib $(ZSTD_BUILD_LIBS) + -C $(@D)/lib $(addsuffix -release,$(ZSTD_BUILD_LIBS) libzstd.pc) $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) $(ZSTD_OPTS) \ - -C $(@D) zstd + -C $(@D)/programs $(ZSTD_BUILD_PROG_TARGET) endef define ZSTD_INSTALL_STAGING_CMDS + [ -e $(@D)/programs/zstd ] && [ -e $(@D)/lib/libzstd.pc ] + $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) $(ZSTD_OPTS) \ + -C $(@D)/lib DESTDIR=$(STAGING_DIR) $(ZSTD_INSTALL_LIBS) \ + install-pc install-includes $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) $(ZSTD_OPTS) \ - DESTDIR=$(STAGING_DIR) PREFIX=/usr -C $(@D)/lib \ - install-pc install-includes $(ZSTD_INSTALL_LIBS) + -C $(@D)/programs DESTDIR=$(STAGING_DIR) install endef define ZSTD_INSTALL_TARGET_CMDS + [ -e $(@D)/programs/zstd ] $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) $(ZSTD_OPTS) \ - DESTDIR=$(TARGET_DIR) PREFIX=/usr -C $(@D)/programs install + -C $(@D)/lib DESTDIR=$(TARGET_DIR) $(ZSTD_INSTALL_LIBS) $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) $(ZSTD_OPTS) \ - DESTDIR=$(TARGET_DIR) PREFIX=/usr -C $(@D)/lib $(ZSTD_INSTALL_LIBS) + -C $(@D)/programs DESTDIR=$(TARGET_DIR) install endef HOST_ZSTD_OPTS += PREFIX=$(HOST_DIR) From patchwork Tue May 25 17:26:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Norbert Lange X-Patchwork-Id: 1483669 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.137; helo=smtp4.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=thpSq2+b; dkim-atps=neutral Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FqLcx70mpz9sRf for ; Wed, 26 May 2021 03:27:45 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 7BF0540538; Tue, 25 May 2021 17:27:44 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GOCWFkfDmgwg; Tue, 25 May 2021 17:27:43 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp4.osuosl.org (Postfix) with ESMTP id A860D4052A; Tue, 25 May 2021 17:27:42 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 4375B1BF57B for ; Tue, 25 May 2021 17:27:06 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 312D060B21 for ; Tue, 25 May 2021 17:27:06 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp3.osuosl.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yGviZldQuuwH for ; Tue, 25 May 2021 17:27:05 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) by smtp3.osuosl.org (Postfix) with ESMTPS id 67A8760B1E for ; Tue, 25 May 2021 17:27:05 +0000 (UTC) Received: by mail-ej1-x629.google.com with SMTP id s22so48359485ejv.12 for ; Tue, 25 May 2021 10:27:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=8McsL1907ews49QI0oplpZ4Ds397CKcztUftDiWCXCQ=; b=thpSq2+bgX5ribYAbBicoRFZ/VegEKhmRaJeP6w4T+jBBnYx6rslSR2ZVt8voWsI2e g4ER5Jo2cTUVrl/MTrbvKaa8Xh7wjneRzxtk0uwDYP2Hnm/u4CUonemql5iH277/WpkA F6nxzkM/OJoeYI4VElmZtmVv76Qcj4S/YFJwUtVg4bRa+yhWKt4pDRzDsIMzdvps974x gSb0QDVg/CAH4LqO2V5PV9fcI936HYcJvNitImQ//o4ZzlONlAMwktoMiNw0K027M9Va Ew6bDZPcmV1ukyvRuPwY7jJl2mmMIawoO066x4EZTTz8AC3ZS4qQw12UOkPyIFOrxag2 IspQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=8McsL1907ews49QI0oplpZ4Ds397CKcztUftDiWCXCQ=; b=K/uWyNRg2rPOjj+MLfLDO/fL9wO+tWQsrtiKSvgBbwdYWghEdaoCpA4suqU+KRC3C5 LwF1rL20FyW8tMFfw74/un0p8dQtRs+wnHgpUzwVFtLMzS8LIN4SUfouzmHzIua64sHp SMtqF7Drt/3DpbdEW6CWKaBx7lzRbY8ZifZnJRrtt867WyztmDi/zr6/5v2mRE87Ulr3 LnBLqq4mVaw6Qc2E3UPZMCwTCIX1U819+YkOrIQ8YYJs1NgMdZjgekFx+4urjjiaMCq+ 23IteJWeXxPHW4ZpPXYNyht3qvoQ5F5Cqo56ig4ErGJJuuFZdnokU321sS0M2P/VNuER cIUA== X-Gm-Message-State: AOAM532woQ9GfHsBIEphvwnGY4MVMojK1idAOHKZ6Er8rN+R6GuIF92D +yg7DjmqiH7YsWZ+s1ieX+c3L+YieguQIg== X-Google-Smtp-Source: ABdhPJzI7NCvZzCaAAwhFs8XKN9xrGwYHTlyhZNT29dXs+TTcQZZu7Jt+CkmTq6Evqi3xGdTa1H/KQ== X-Received: by 2002:a17:907:2056:: with SMTP id pg22mr29855962ejb.19.1621963623718; Tue, 25 May 2021 10:27:03 -0700 (PDT) Received: from debian-noppl.. (84-114-45-16.cable.dynamic.surfer.at. [84.114.45.16]) by smtp.gmail.com with ESMTPSA id w10sm9333204ejq.48.2021.05.25.10.27.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 May 2021 10:27:03 -0700 (PDT) From: Norbert Lange To: buildroot@buildroot.org Date: Tue, 25 May 2021 19:26:50 +0200 Message-Id: <20210525172652.821351-4-nolange79@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210525172652.821351-1-nolange79@gmail.com> References: <20210525172652.821351-1-nolange79@gmail.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH v2 4/5] package/zstd: Change Build options X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrey Smirnov , Norbert Lange Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Disable the legacy format, these are just needed for decompressing files created with pre-release version. Use Buildroot's setting for optimization, zstd's build system overrides CFLAGS, but MOREFLAGS can override again. Quick tests show that using -O2 (like buildroot) is actually a little faster than -O3 on x86_64 Atoms. Signed-off-by: Norbert Lange --- package/zstd/zstd.mk | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/package/zstd/zstd.mk b/package/zstd/zstd.mk index a7a5ba4e50..a9499df4d0 100644 --- a/package/zstd/zstd.mk +++ b/package/zstd/zstd.mk @@ -13,6 +13,10 @@ ZSTD_CPE_ID_VENDOR = facebook ZSTD_CPE_ID_PRODUCT = zstandard ZSTD_OPTS += PREFIX=/usr +ZSTD_OPTS += ZSTD_LEGACY_SUPPORT=0 + +# zstd will append -O3 after $(CFLAGS), use MOREFLAGS to override again +ZSTD_OPTS_MOREFLAGS += $(TARGET_OPTIMIZATION) ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y) ZSTD_OPTS += HAVE_THREAD=1 @@ -41,6 +45,8 @@ else ZSTD_OPTS += HAVE_LZ4=0 endif +ZSTD_OPTS += "MOREFLAGS=$(ZSTD_OPTS_MOREFLAGS)" + ZSTD_BUILD_PROG_TARGET := zstd-release # Since v1.5.0 the dynamic library is built for From patchwork Tue May 25 17:26:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Norbert Lange X-Patchwork-Id: 1483670 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=smtp2.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=WaSzoCnJ; dkim-atps=neutral Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FqLdB6pF2z9sPf for ; Wed, 26 May 2021 03:27:58 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 5ECBC40495; Tue, 25 May 2021 17:27:57 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id u0X__7-3mPZc; Tue, 25 May 2021 17:27:56 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp2.osuosl.org (Postfix) with ESMTP id 9EBC540487; Tue, 25 May 2021 17:27:55 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id E478B1BF57B for ; Tue, 25 May 2021 17:27:07 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id E0CF04045B for ; Tue, 25 May 2021 17:27:07 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HzEP2mN_rIpK for ; Tue, 25 May 2021 17:27:07 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 Received: from mail-ed1-x52e.google.com (mail-ed1-x52e.google.com [IPv6:2a00:1450:4864:20::52e]) by smtp2.osuosl.org (Postfix) with ESMTPS id E94EB401F4 for ; Tue, 25 May 2021 17:27:06 +0000 (UTC) Received: by mail-ed1-x52e.google.com with SMTP id j10so19635527edw.8 for ; Tue, 25 May 2021 10:27:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=dGXhF/12aKvCp0I/jabKcIXDOGizeuIU4sPYuDWdrFU=; b=WaSzoCnJ0s26ZFnDvRkYsv+J4DluoFuL9FjvY+LaIVW9jR3ndc+NMUbTNplnPKkoK/ p+V5jGgYR8Ho2I860xhUELVSX21gtBCptTvbkdg6pUNYg7BQ7hoK7C2s5wer1JMi4J7X JdgZ4Ivb/YADJZHVjBtc2xQ9A7TGoKRfvUL94kdzmDm1FomXr6R/VeHS/Ctes68GGrf6 9cQg+9iHGURAuC/piaDez9wfiOveRvVbe1lFAVrKKFGuJko7E0PXWfJUFlDLfX92QQnu jFI7bCRilfYLaKHdd6hRdfSyH3Z2/MoZgat5+ViWc3tGN9RhO3MxQlZ9geESPu+E5zWq d0sw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=dGXhF/12aKvCp0I/jabKcIXDOGizeuIU4sPYuDWdrFU=; b=Ss+mEOS8un/I4m7xSqhbwxQNfuGnvEM7AyxG5wQ/Ac1tLwTdQyqD8KzXR2+cV1zSh0 c3L1AhOrvztesb9F+L/R96chfTC9yAbYx6z5alHzRMi1X+QuFQf5zb032cDqISPFnDfy AsyfK7hx/ntEmObJHP4OhIjBqPDQnf3IEp9TYwZ1xwGtOJRmjHuOL61mgoKWc2CAQTsk 5TraEJdqi0869y2/IoJVzVKuCo7z6K4HVjla1DMpDAnfl2qgYiKsQs1bV+XOihbMevgY 9tq51afMjtyABgNqRnzPp1ExlkUGsQnNjw9wfMG29YGDd9KIjKWZ0VKg2OQQ0L7x07e4 5vPg== X-Gm-Message-State: AOAM533wXnQzE2Z+1KPcXPCwY6v/iNtsN+XXyrjUR/Dsq0/K8YZJI83x 0YQF6IOBvcIa9+KX2/oagOtThZXMYGeDUg== X-Google-Smtp-Source: ABdhPJxZJ3oHxTvMvMid0dPJUx8wGYHPnM3RL6OHP6+jZK/JCBznZge7wVEzY1fGFBFa6d60VdDm3w== X-Received: by 2002:a05:6402:430b:: with SMTP id m11mr15183569edc.31.1621963625197; Tue, 25 May 2021 10:27:05 -0700 (PDT) Received: from debian-noppl.. (84-114-45-16.cable.dynamic.surfer.at. [84.114.45.16]) by smtp.gmail.com with ESMTPSA id w10sm9333204ejq.48.2021.05.25.10.27.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 May 2021 10:27:04 -0700 (PDT) From: Norbert Lange To: buildroot@buildroot.org Date: Tue, 25 May 2021 19:26:51 +0200 Message-Id: <20210525172652.821351-5-nolange79@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210525172652.821351-1-nolange79@gmail.com> References: <20210525172652.821351-1-nolange79@gmail.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH v2 5/5] package/zstd: Add option for cli binary X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrey Smirnov , Norbert Lange Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" There are a couple of targets to build the cli tool with less features (no legacy-support, benchmarking), or dynamically linked to the library. Add an option to choose the variant. To allow the installation step to pick the variant, it has to be copied to the normal location. Signed-off-by: Norbert Lange --- package/zstd/Config.in | 21 +++++++++++++++++++++ package/zstd/zstd.mk | 9 ++++++++- 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/package/zstd/Config.in b/package/zstd/Config.in index 9fa70c65cc..0d2ab84771 100644 --- a/package/zstd/Config.in +++ b/package/zstd/Config.in @@ -10,3 +10,24 @@ config BR2_PACKAGE_ZSTD compression formats https://facebook.github.io/zstd + +if BR2_PACKAGE_ZSTD + +choice + prompt "Executable flavor" + help + Pick between variants of the zstd tool. + +config BR2_PACKAGE_ZSTD_PROG_DEFAULT + bool "Default build (static, full-featured)" + +config BR2_PACKAGE_ZSTD_PROG_DYNAMIC + bool "Dynamic build (needs library with identical version)" + depends on !BR2_STATIC_LIBS + +config BR2_PACKAGE_ZSTD_PROG_SMALL + bool "Small build (static, less features)" + +endchoice + +endif diff --git a/package/zstd/zstd.mk b/package/zstd/zstd.mk index a9499df4d0..ecad26e0df 100644 --- a/package/zstd/zstd.mk +++ b/package/zstd/zstd.mk @@ -48,6 +48,11 @@ endif ZSTD_OPTS += "MOREFLAGS=$(ZSTD_OPTS_MOREFLAGS)" ZSTD_BUILD_PROG_TARGET := zstd-release +ifeq ($(BR2_PACKAGE_ZSTD_PROG_DYNAMIC),y) +ZSTD_BUILD_PROG_TARGET := zstd-dll +else ifeq ($(BR2_PACKAGE_ZSTD_PROG_SMALL),y) +ZSTD_BUILD_PROG_TARGET := zstd-small +endif # Since v1.5.0 the dynamic library is built for # multithreading, while the static library is not. @@ -78,7 +83,9 @@ define ZSTD_BUILD_CMDS $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) $(ZSTD_OPTS) \ -C $(@D)/lib $(addsuffix -release,$(ZSTD_BUILD_LIBS) libzstd.pc) $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) $(ZSTD_OPTS) \ - -C $(@D)/programs $(ZSTD_BUILD_PROG_TARGET) + -C $(@D)/programs $(ZSTD_BUILD_PROG_TARGET) && \ + { [ ! -e $(@D)/programs/$(ZSTD_BUILD_PROG_TARGET) ] || \ + ln -f $(@D)/programs/$(ZSTD_BUILD_PROG_TARGET) $(@D)/programs/zstd; } endef define ZSTD_INSTALL_STAGING_CMDS