package/zstd: fix build following bump to 1.5.6

In commit f7f2903f3e, the zstd package
was bumped to 1.5.6. Since then, the zstd has been failing to build in
our autobuilders, causing over 1400+ build failures.

The issue turned out to be a one character typo introduced in an
upstream commit. This commit fixes that by introducing a patch, which
has been submitted upstream.

Fixes:

  http://autobuild.buildroot.net/results/df983da15a5918566c89a87038d0bdc6cb530485/

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
Thomas Petazzoni
2024-07-13 14:01:50 +02:00
parent 7169c9412d
commit a882426e37

View File

@@ -0,0 +1,47 @@
From 4de25344f7c01f00d99bc467e76bc6f9b6971dd7 Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Date: Sat, 13 Jul 2024 13:53:53 +0200
Subject: [PATCH] lib/libzstd.mk: fix typo in the definition of LIB_BINDIR
Commit f4dbfce79cb2b82fb496fcd2518ecd3315051b7d ("define LIB_SRCDIR
and LIB_BINDIR") significantly reworked the build logic, but in its
introduction of LIB_BINDIR a typo was made.
It was introduced as such:
+LIB_SRCDIR ?= $(dir $(realpath $(lastword $(MAKEFILE_LIST))))
+LIB_BINDIR ?= $(LIBSRC_DIR)
But the definition of LIB_BINDIR has a typo: it should use
$(LIB_SRCDIR) not $(LIBSRC_DIR).
Due to this, $(LIB_BINDIR) is empty, therefore in programs/Makefile,
-L$(LIB_BINDIR) is expanded to just -L, and consequently when trying
to link the "zstd" binary with the libzstd library, it cannot find it:
host/lib/gcc/powerpc64-buildroot-linux-gnu/13.3.0/../../../../powerpc64-buildroot-linux-gnu/bin/ld: cannot find -lzstd: No such file or directory
This commit fixes the build by fixing this typo.
Upstream: https://github.com/facebook/zstd/pull/4096
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
lib/libzstd.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/libzstd.mk b/lib/libzstd.mk
index a308a6ef..c7ae2ff4 100644
--- a/lib/libzstd.mk
+++ b/lib/libzstd.mk
@@ -22,7 +22,7 @@ LIBZSTD_MK_INCLUDED := 1
# By default, library's directory is same as this included makefile
LIB_SRCDIR ?= $(dir $(realpath $(lastword $(MAKEFILE_LIST))))
-LIB_BINDIR ?= $(LIBSRC_DIR)
+LIB_BINDIR ?= $(LIB_SRCDIR)
# ZSTD_LIB_MINIFY is a helper variable that
# configures a bunch of other variables to space-optimized defaults.
--
2.45.2