mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-11-13 03:58:55 -10:00
Add support for pzstd, the multi-threaded implementation of zstd. The pzstd build requires C++ and threads support. On some architectures (e.g., Microblaze, SPARC), it also requires linking against libatomic due to the use of atomic operations. Ensure that -latomic is passed in LDFLAGS during both the build and install phases. Consistently passing LDFLAGS is necessary because the pzstd Makefile re-links the binary during the 'install' target due to its dependency on the static library. Fixes build failures reported with bootlin-microblazeel-uclibc and bootlin-sparc-uclibc toolchains: Pzstd.cpp:(.text+0x17e8): undefined reference to '__atomic_compare_exchange_1' Pzstd.cpp:(.text._ZN5pzstd15BufferWorkQueue3popERNS_6BufferE): undefined reference to '__atomic_fetch_sub_4' For host-zstd, always build pzstd. It just adds a few seconds of build time. Signed-off-by: Shubham Chakraborty <chakrabortyshubham66@gmail.com> Reviewed-by: Joseph Kogut <joseph.kogut@gmail.com> Tested-by: Joseph Kogut <joseph.kogut@gmail.com> [Arnout: unconditionally build pzstd for the host] Signed-off-by: Arnout Vandecappelle <arnout@rnout.be>
28 lines
777 B
Plaintext
28 lines
777 B
Plaintext
config BR2_PACKAGE_ZSTD
|
|
bool "zstd"
|
|
help
|
|
Zstandard, or zstd as short version, is a fast lossless
|
|
compression algorithm, targeting real-time compression
|
|
scenarios at zlib-level and better compression ratios
|
|
|
|
The selection of other packages will enable some features:
|
|
xz, lz4 and/or zlib will enable support for corresponding
|
|
compression formats
|
|
|
|
https://facebook.github.io/zstd
|
|
|
|
if BR2_PACKAGE_ZSTD
|
|
|
|
config BR2_PACKAGE_ZSTD_PZSTD
|
|
bool "pzstd"
|
|
depends on BR2_INSTALL_LIBSTDCPP
|
|
depends on BR2_TOOLCHAIN_HAS_THREADS
|
|
help
|
|
PZstandard, or pzstd, is a multi-threaded implementation
|
|
of the Zstandard (zstd) compression algorithm.
|
|
|
|
comment "pzstd needs a toolchain w/ C++, threads"
|
|
depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS
|
|
|
|
endif
|