aboutsummaryrefslogtreecommitdiffstats
path: root/tools/ccache
diff options
context:
space:
mode:
Diffstat (limited to 'tools/ccache')
-rw-r--r--tools/ccache/Makefile44
-rwxr-xr-xtools/ccache/files/ccache_cc2
-rwxr-xr-xtools/ccache/files/ccache_cxx2
-rw-r--r--tools/ccache/patches/100-honour-copts.patch10
4 files changed, 32 insertions, 26 deletions
diff --git a/tools/ccache/Makefile b/tools/ccache/Makefile
index 21123b316db..111bd91bb63 100644
--- a/tools/ccache/Makefile
+++ b/tools/ccache/Makefile
@@ -1,5 +1,5 @@
#
-# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2006-2015 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
@@ -8,37 +8,29 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/target.mk
PKG_NAME:=ccache
-PKG_VERSION:=3.1.3
+PKG_VERSION:=3.4.2
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://samba.org/ftp/ccache/
-PKG_MD5SUM:=b952d75e9ca37209d608ea58d84135cd
-PKG_CAT:=zcat
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE_URL:=https://download.samba.org/pub/ccache/ \
+ https://samba.org/ftp/ccache/
+PKG_HASH:=18a8b14367d63d3d37fb6c33cba60e1b7fcd7a63d608df97c9771ae0d234fee2
include $(INCLUDE_DIR)/host-build.mk
-ifneq ($(strip $(shell which ccache >/dev/null && echo found)),found)
- define Host/Compile
- $(MAKE) CC="$(HOSTCC_NOCACHE)" -C $(HOST_BUILD_DIR)
- endef
+HOST_CONFIGURE_VARS += CC="$(HOSTCC_NOCACHE)"
- define Host/Clean
+define Host/Install/ccache
+ $(INSTALL_DIR) $(STAGING_DIR_HOST)/bin/
+ $(CP) ./files/* $(STAGING_DIR_HOST)/bin/
+endef
+
+define Host/Clean
-$(MAKE) -C $(HOST_BUILD_DIR) uninstall
$(call Host/Clean/Default)
- endef
-else
- define Host/Prepare
- endef
- define Host/Configure
- endef
- define Host/Compile
- endef
- define Host/Install
- endef
- define Host/Clean
- endef
- define Download
- endef
-endif
+endef
+define Host/Install
+ $(call Host/Install/Default)
+ $(call Host/Install/ccache)
+endef
$(eval $(call HostBuild))
diff --git a/tools/ccache/files/ccache_cc b/tools/ccache/files/ccache_cc
new file mode 100755
index 00000000000..01c4ad42a21
--- /dev/null
+++ b/tools/ccache/files/ccache_cc
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec ccache "${TARGET_CC_NOCACHE}" "$@"
diff --git a/tools/ccache/files/ccache_cxx b/tools/ccache/files/ccache_cxx
new file mode 100755
index 00000000000..cc60eb3a13c
--- /dev/null
+++ b/tools/ccache/files/ccache_cxx
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec ccache "${TARGET_CXX_NOCACHE}" "$@"
diff --git a/tools/ccache/patches/100-honour-copts.patch b/tools/ccache/patches/100-honour-copts.patch
new file mode 100644
index 00000000000..1916d17c60e
--- /dev/null
+++ b/tools/ccache/patches/100-honour-copts.patch
@@ -0,0 +1,10 @@
+--- a/src/ccache.c
++++ b/src/ccache.c
+@@ -1859,6 +1859,7 @@ calculate_object_hash(struct args *args,
+ "CPLUS_INCLUDE_PATH",
+ "OBJC_INCLUDE_PATH",
+ "OBJCPLUS_INCLUDE_PATH", // clang
++ "GCC_HONOUR_COPTS",
+ NULL
+ };
+ for (const char **p = envvars; *p; ++p) {