package/zstd: fix dynamic build without threads
authorFabrice Fontaine <fontaine.fabrice@gmail.com>
Thu, 1 Jul 2021 19:29:59 +0000 (21:29 +0200)
committerArnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Wed, 4 Aug 2021 12:33:45 +0000 (14:33 +0200)
commit8dfd7a1f903d86584e7942ead1ad79e0185a3391
treeb88d48b83b90603d6d8cd6613bbac5c7baab762c
parent25d602a6a66bfecf17da0ca5edf589ace95e58db
package/zstd: fix dynamic build without threads

Dynamic build without threads is broken since bump to version 1.5.0 in
commit aad8bbf58842dd62a4911d2c671ad9598e26b459

Indeed, dynamic library is built with threads support since
https://github.com/facebook/zstd/commit/91465e23b2710de031a762874cafb417f8b7556e

To fix this build failure, add -nomt if needed however libzstd-nomt is a
"special target that builds a library in single-thread mode _and_
without zstdmt_compress.c". For an unknown reason, this target fails to
build and don't create any symlinks so replace libzstd-{mt,nomt} by
lib-{mt,nomt} even if this will have the side effect of building a
shared and a static version of the library.

Move the existing HAVE_THREAD setting in the same condition.

While at it, also replace "libzstd.a libzstd" by "lib"

Fixes:
 - http://autobuild.buildroot.org/results/e609601a0fc91c44d88a12c35b29ce937381462f

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
[Arnout: move HAVE_THREAD in the same condition]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
package/zstd/zstd.mk