diff options
author | Mike Baker <mbm@openwrt.org> | 2006-08-04 06:56:10 +0000 |
---|---|---|
committer | Mike Baker <mbm@openwrt.org> | 2006-08-04 06:56:10 +0000 |
commit | c8b0cd5a5babeafddab9f6ffd52a5a14fbe649c8 (patch) | |
tree | 280d1119808b5c2a05fa2dd9a1e3e568dc5d018a | |
parent | ad24256f8fd117695b1cb69f8afab9118157d5d0 (diff) | |
download | mtk-20170518-c8b0cd5a5babeafddab9f6ffd52a5a14fbe649c8.zip mtk-20170518-c8b0cd5a5babeafddab9f6ffd52a5a14fbe649c8.tar.gz mtk-20170518-c8b0cd5a5babeafddab9f6ffd52a5a14fbe649c8.tar.bz2 |
and now, finally, enable ccache support
SVN-Revision: 4434
-rw-r--r-- | openwrt/Config.in | 7 | ||||
-rw-r--r-- | openwrt/rules.mk | 14 |
2 files changed, 17 insertions, 4 deletions
diff --git a/openwrt/Config.in b/openwrt/Config.in index 752e1d9..edcb19a 100644 --- a/openwrt/Config.in +++ b/openwrt/Config.in @@ -44,6 +44,13 @@ config JLEVEL help Number of jobs to run simultanesouly +config CCACHE + bool + prompt "Use ccache" if BUILDOPTS + default n + help + Compiler cache; see http://ccache.samba.org/ + source "toolchain/Config.in" source "target/sdk/Config.in" diff --git a/openwrt/rules.mk b/openwrt/rules.mk index 206e57d..89adb3e 100644 --- a/openwrt/rules.mk +++ b/openwrt/rules.mk @@ -35,8 +35,8 @@ IPKG_STATE_DIR:=$(TARGET_DIR)/usr/lib/ipkg REAL_GNU_TARGET_NAME=$(OPTIMIZE_FOR_CPU)-linux-uclibc GNU_TARGET_NAME=$(OPTIMIZE_FOR_CPU)-linux -KERNEL_CROSS:=$(STAGING_DIR)/bin/$(OPTIMIZE_FOR_CPU)-linux-uclibc- -TARGET_CROSS:=$(STAGING_DIR)/bin/$(OPTIMIZE_FOR_CPU)-linux-uclibc- +KERNEL_CROSS:=$(OPTIMIZE_FOR_CPU)-linux-uclibc- +TARGET_CROSS:=$(OPTIMIZE_FOR_CPU)-linux-uclibc- IMAGE:=$(BUILD_DIR)/root_fs_$(ARCH) TARGET_PATH:=$(STAGING_DIR)/usr/bin:$(STAGING_DIR)/bin:/bin:/sbin:/usr/bin:/usr/sbin @@ -53,6 +53,11 @@ PATCH:=$(SCRIPT_DIR)/patch-kernel.sh SED:=$(STAGING_DIR)/bin/sed -i -e CP:=cp -fpR +ifneq ($(CONFIG_CCACHE),) + export CCACHE_DIR:=$(TOPDIR)/ccache_$(ARCH) + TARGET_CC:=ccache $(TARGET_CC) +endif + HOST_ARCH:=$(shell $(HOSTCC) -dumpmachine | sed -e s'/-.*//' \ -e 's/sparc.*/sparc/' \ -e 's/arm.*/arm/' \ @@ -74,8 +79,8 @@ TARGET_CONFIGURE_OPTS:= \ AS=$(TARGET_CROSS)as \ LD=$(TARGET_CROSS)ld \ NM=$(TARGET_CROSS)nm \ - CC=$(TARGET_CROSS)gcc \ - GCC=$(TARGET_CROSS)gcc \ + CC="$(TARGET_CC)" \ + GCC="$(TARGET_CC)" \ CXX=$(TARGET_CROSS)g++ \ RANLIB=$(TARGET_CROSS)ranlib \ STRIP=$(TARGET_CROSS)strip @@ -84,6 +89,7 @@ TARGET_CONFIGURE_OPTS:= \ RSTRIP:= \ STRIP="$(STRIP)" \ STRIP_KMOD="$(TARGET_CROSS)strip --strip-unneeded --remove-section=.comment" \ + PATH=$(TARGET_PATH) \ $(SCRIPT_DIR)/rstrip.sh # where to build (and put) .ipk packages |