tools/zstd: compile with cmake

It's faster and more reliable.

Removed ccache cmake build dependency as it's now implicit.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev 2021-01-20 20:54:58 -08:00 committed by Paul Spooren
parent 7534c8a2e1
commit ec0c6c1143
2 changed files with 9 additions and 3 deletions

View File

@ -72,6 +72,7 @@ $(curdir)/sdcc/compile := $(curdir)/bison/compile
$(curdir)/squashfs/compile := $(curdir)/lzma-old/compile $(curdir)/squashfs/compile := $(curdir)/lzma-old/compile
$(curdir)/squashfskit4/compile := $(curdir)/xz/compile $(curdir)/zlib/compile $(curdir)/squashfskit4/compile := $(curdir)/xz/compile $(curdir)/zlib/compile
$(curdir)/zlib/compile := $(curdir)/cmake/compile $(curdir)/zlib/compile := $(curdir)/cmake/compile
$(curdir)/zstd/compile := $(curdir)/cmake/compile
ifneq ($(HOST_OS),Linux) ifneq ($(HOST_OS),Linux)
$(curdir)/squashfskit4/compile += $(curdir)/coreutils/compile $(curdir)/squashfskit4/compile += $(curdir)/coreutils/compile
@ -81,7 +82,7 @@ endif
ifneq ($(CONFIG_CCACHE)$(CONFIG_SDK),) ifneq ($(CONFIG_CCACHE)$(CONFIG_SDK),)
$(foreach tool, $(filter-out xz zstd patch pkgconf libressl cmake,$(tools-y)), $(eval $(curdir)/$(tool)/compile += $(curdir)/ccache/compile)) $(foreach tool, $(filter-out xz zstd patch pkgconf libressl cmake,$(tools-y)), $(eval $(curdir)/$(tool)/compile += $(curdir)/ccache/compile))
tools-y += ccache tools-y += ccache
$(curdir)/ccache/compile := $(curdir)/cmake/compile $(curdir)/zstd/compile $(curdir)/ccache/compile := $(curdir)/zstd/compile
endif endif
# in case there is no patch tool on the host we need to make patch tool a # in case there is no patch tool on the host we need to make patch tool a

View File

@ -11,11 +11,16 @@ PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE PKG_LICENSE_FILES:=LICENSE
PKG_CPE_ID:=cpe:/a:facebook:zstandard PKG_CPE_ID:=cpe:/a:facebook:zstandard
CMAKE_SOURCE_SUBDIR:=build/cmake
HOST_BUILD_PARALLEL:=1 HOST_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/host-build.mk include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/cmake.mk
HOSTCC := $(HOSTCC_NOCACHE) CMAKE_HOST_OPTIONS += \
HOST_MAKE_FLAGS = PREFIX=$(HOST_BUILD_PREFIX) HAVE_ZLIB=0 HAVE_LZMA=0 HAVE_LZ4=0 -DBUILD_TESTING=OFF \
-DCMAKE_C_COMPILER_LAUNCHER="" \
-DCMAKE_C_COMPILER=$(HOSTCC_NOCACHE) \
-DZSTD_LEGACY_SUPPORT=OFF
$(eval $(call HostBuild)) $(eval $(call HostBuild))