[openwrt/openwrt] tools: add xxhash package for ccache
LEDE Commits
lede-commits at lists.infradead.org
Thu Feb 6 03:55:35 PST 2025
ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/e1451a53e1262837392a4d56aea45f53d6d826c6
commit e1451a53e1262837392a4d56aea45f53d6d826c6
Author: Chukun Pan <amadeus at jmu.edu.cn>
AuthorDate: Mon Jan 20 23:10:36 2025 +0800
tools: add xxhash package for ccache
The ccache build requires xxhash, which is download from
the Internet. So add host-build package for xxhash.
Fixes: #16851
Signed-off-by: Chukun Pan <amadeus at jmu.edu.cn>
[ use git source proto ]
Link: https://github.com/openwrt/openwrt/pull/17700
Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
tools/Makefile | 5 +++--
tools/xxhash/Makefile | 25 +++++++++++++++++++++++++
2 files changed, 28 insertions(+), 2 deletions(-)
diff --git a/tools/Makefile b/tools/Makefile
index b16c5d9c5b..dd49ea5e10 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -146,8 +146,9 @@ endif
ifneq ($(CONFIG_CCACHE)$(CONFIG_SDK),)
$(foreach tool, $(filter-out zstd zlib xz pkgconf patch ninja meson libressl expat cmake,$(tools-y)), $(eval $(curdir)/$(tool)/compile += $(curdir)/ccache/compile))
-tools-y += ccache
-$(curdir)/ccache/compile := $(curdir)/cmake/compile
+tools-y += ccache xxhash
+$(curdir)/xxhash/compile := $(curdir)/cmake/compile
+$(curdir)/ccache/compile := $(curdir)/xxhash/compile
endif
# in case there is no patch tool on the host we need to make patch tool a
diff --git a/tools/xxhash/Makefile b/tools/xxhash/Makefile
new file mode 100644
index 0000000000..5d5754d63a
--- /dev/null
+++ b/tools/xxhash/Makefile
@@ -0,0 +1,25 @@
+# SPDX-License-Identifier: GPL-2.0-only
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=xxHash
+PKG_VERSION:=0.8.3
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL=https://github.com/Cyan4973/xxHash
+PKG_SOURCE_VERSION:=e626a72bc2321cd320e953a0ccf1584cad60f363
+PKG_MIRROR_HASH:=234cfc24004c1b97d3ec9c48e976347b31a513a68de40f57a765667eb89dbbb0
+
+PKG_LICENSE:=BSD-2-Clause
+PKG_LICENSE_FILES:=LICENSE
+
+include $(INCLUDE_DIR)/host-build.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+CMAKE_C_COMPILER_LAUNCHER :=
+CMAKE_CXX_COMPILER_LAUNCHER :=
+
+CMAKE_BINARY_SUBDIR := build
+CMAKE_SOURCE_SUBDIR := cmake_unofficial
+
+$(eval $(call HostBuild))
More information about the lede-commits
mailing list