From da1bc1061fbed88e9658a3f336fb50dbd0b0f02b Mon Sep 17 00:00:00 2001 From: Richard Patel Date: Wed, 3 Jan 2024 08:24:32 +0000 Subject: [PATCH] deps: add Zstandard v1.5.5 --- config/linux_clang_icelake.mk | 1 + config/linux_clang_x86_64.mk | 1 + config/linux_gcc_icelake.mk | 1 + config/linux_gcc_x86_64.mk | 1 + config/linux_gcc_x86_64_wd_f1.mk | 1 + config/linux_gcc_zen2.mk | 1 + config/native.mk | 2 ++ config/with-zstd.mk | 3 +++ deps.sh | 4 ++-- 9 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 config/with-zstd.mk diff --git a/config/linux_clang_icelake.mk b/config/linux_clang_icelake.mk index 003a2e1c24..e0eaaa07af 100644 --- a/config/linux_clang_icelake.mk +++ b/config/linux_clang_icelake.mk @@ -7,6 +7,7 @@ include config/with-brutality.mk include config/with-optimization.mk include config/with-threads.mk include config/with-openssl.mk +include config/with-zstd.mk # Clang sadly doesn't support important optimizations. This practically # limits clang usage to code hygiene usage for the time being. Here, diff --git a/config/linux_clang_x86_64.mk b/config/linux_clang_x86_64.mk index 5be6cb5a86..e9e13a2e47 100644 --- a/config/linux_clang_x86_64.mk +++ b/config/linux_clang_x86_64.mk @@ -8,6 +8,7 @@ include config/with-brutality.mk include config/with-optimization.mk include config/with-threads.mk include config/with-openssl.mk +include config/with-zstd.mk include config/x86-64-clang-flags.mk include config/x86-64-flags.mk diff --git a/config/linux_gcc_icelake.mk b/config/linux_gcc_icelake.mk index 3efd2bac94..45c7c970c4 100644 --- a/config/linux_gcc_icelake.mk +++ b/config/linux_gcc_icelake.mk @@ -8,6 +8,7 @@ include config/with-brutality.mk include config/with-optimization.mk include config/with-threads.mk include config/with-openssl.mk +include config/with-zstd.mk CPPFLAGS+=-fomit-frame-pointer -falign-functions=32 -falign-jumps=32 -falign-labels=32 -falign-loops=32 \ -march=icelake-server -mtune=icelake-server -mfpmath=sse -mbranch-cost=5 \ diff --git a/config/linux_gcc_x86_64.mk b/config/linux_gcc_x86_64.mk index c19c89fd5b..1521cf1cc9 100644 --- a/config/linux_gcc_x86_64.mk +++ b/config/linux_gcc_x86_64.mk @@ -8,6 +8,7 @@ include config/with-brutality.mk include config/with-optimization.mk include config/with-threads.mk include config/with-openssl.mk +include config/with-zstd.mk include config/x86-64-flags.mk include config/x86-64-gcc-flags.mk diff --git a/config/linux_gcc_x86_64_wd_f1.mk b/config/linux_gcc_x86_64_wd_f1.mk index 65487a3e2d..08239ba634 100644 --- a/config/linux_gcc_x86_64_wd_f1.mk +++ b/config/linux_gcc_x86_64_wd_f1.mk @@ -8,6 +8,7 @@ include config/with-brutality.mk include config/with-optimization.mk include config/with-threads.mk include config/with-openssl.mk +include config/with-zstd.mk include config/x86-64-flags.mk include config/x86-64-gcc-flags.mk diff --git a/config/linux_gcc_zen2.mk b/config/linux_gcc_zen2.mk index c31dd3e7e0..4fd728c1c2 100644 --- a/config/linux_gcc_zen2.mk +++ b/config/linux_gcc_zen2.mk @@ -8,6 +8,7 @@ include config/with-brutality.mk include config/with-optimization.mk include config/with-threads.mk include config/with-openssl.mk +include config/with-zstd.mk # GCC 8 (Firedancer's minimum supported GCC version) only supports znver1. ifeq ($(shell $(CC) -dumpversion),8) diff --git a/config/native.mk b/config/native.mk index 9b0b900dfe..ba2d8d7e59 100644 --- a/config/native.mk +++ b/config/native.mk @@ -90,6 +90,8 @@ ifeq ($(FD_HAS_OPENSSL),1) include config/with-openssl.mk endif +include config/with-zstd.mk + ifeq ($(FD_IS_X86_64),1) include config/x86-64-flags.mk ifeq ($(FD_USING_GCC),1) diff --git a/config/with-zstd.mk b/config/with-zstd.mk new file mode 100644 index 0000000000..f883a9fef2 --- /dev/null +++ b/config/with-zstd.mk @@ -0,0 +1,3 @@ +FD_HAS_ZSTD:=1 +CFLAGS+=-DFD_HAS_ZSTD=1 +LDFLAGS+=-lzstd diff --git a/deps.sh b/deps.sh index 8c3d0ee1db..92684e338f 100755 --- a/deps.sh +++ b/deps.sh @@ -104,7 +104,7 @@ fetch () { #checkout_repo zlib https://github.com/madler/zlib "v1.2.13" #checkout_repo bzip2 https://sourceware.org/git/bzip2.git "bzip2-1.0.8" - #checkout_repo zstd https://github.com/facebook/zstd "v1.5.4" + checkout_repo zstd https://github.com/facebook/zstd "v1.5.5" checkout_repo openssl https://github.com/quictls/openssl "openssl-3.1.2-quic1" #checkout_repo rocksdb https://github.com/facebook/rocksdb "v7.10.2" #checkout_repo secp256k1 https://github.com/bitcoin-core/secp256k1 "v0.3.2" @@ -450,7 +450,7 @@ install () { #( install_zlib ) #( install_bzip2 ) - #( install_zstd ) + ( install_zstd ) #( install_secp256k1 ) ( install_openssl ) #( install_rocksdb )