Skip to contentSkip to conversation

Integrate ccache-native

PATCH Applied [email protected] 2 participants 6 messages Jun 24, 2011 – Jun 30, 2011

lore
Share & tools
lore
#0 lore raw

v2 cover Integrate ccache-native

From: Wenzong Fan <[email protected]>

1) Add ccache as a native tool and put its recipe files to:
'meta/recipes-devtools/ccache';

2) Set 'CCACHE_DIR' in 'bitbake.conf' and create the dirs for every package before task 'do_configure' started;

3) Add 'ccache' for all SDK images;

4) Remove duplicate 'ccache.inc' from 'meta/class/'.

The following changes since commit 7cd2ac0e40d854bab9a32512018aff6172500c0e:
Beth Flanagan (1):
common-licenses: Additions and corrections

are available in the git repository at:

git://git.pokylinux.org/poky-contrib wenzong/ccache
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=wenzong/ccache

Wenzong Fan (4):
ccache: Integrate ccache-native to poky
ccache: Set CCACHE on a per recipe basis
ccache: Add 'ccache' for SDK images
ccache: Remove duplicate 'ccache.inc' from 'meta/class/'

 meta/classes/base.bbclass                    |    1 +
 meta/classes/ccache.inc                      |   11 -----------
 meta/conf/bitbake.conf                       |    1 +
 meta/recipes-core/tasks/task-core-sdk.bb     |    1 +
 meta/recipes-devtools/ccache/ccache.inc      |   16 ++++++++++++++++
 meta/recipes-devtools/ccache/ccache_3.1.5.bb |    8 ++++++++
 6 files changed, 27 insertions(+), 11 deletions(-)
 delete mode 100644 meta/classes/ccache.inc
 create mode 100644 meta/recipes-devtools/ccache/ccache.inc
 create mode 100644 meta/recipes-devtools/ccache/ccache_3.1.5.bb
#1 lore raw

PATCH v2 1/4 ccache: Integrate ccache-native to poky

From: Wenzong Fan <[email protected]>

Add ccache as a native tool and put its recipe files to:
'meta/recipes-devtools/ccache'.

---
 meta/recipes-devtools/ccache/ccache.inc      |   16 ++++++++++++++++
 meta/recipes-devtools/ccache/ccache_3.1.5.bb |    8 ++++++++
 2 files changed, 24 insertions(+), 0 deletions(-)
 create mode 100644 meta/recipes-devtools/ccache/ccache.inc
 create mode 100644 meta/recipes-devtools/ccache/ccache_3.1.5.bb
meta/recipes-devtools/ccache/ccache.inc new file +16 -0
new file mode 100644
index 0000000..e9f7344
@@ -0,0 +1,16 @@
+SUMMARY = "a fast C/C++ compiler cache"
+DESCRIPTION = "ccache is a compiler cache. It speeds up recompilation \
+by caching the result of previous compilations and detecting when the \
+same compilation is being done again. Supported languages are C, C\+\+, \
+Objective-C and Objective-C++."
+HOMEPAGE = "http://ccache.samba.org"
+SECTION = "devel"
+LICENSE = "GPLv3+"
+
+SRC_URI = "http://samba.org/ftp/ccache/ccache-${PV}.tar.gz"
+
+inherit autotools
+
+BBCLASSEXTEND = "native"
+
+TARGET_CC_ARCH += "${LDFLAGS}"
meta/recipes-devtools/ccache/ccache_3.1.5.bb new file +8 -0
new file mode 100644
index 0000000..9a967b2
@@ -0,0 +1,8 @@
+require ccache.inc
+
+PR = "r0"
+LICENSE = "GPLv3+"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=80e92ec45d4fca91f127864fb9e5d932"
+
+SRC_URI[md5sum] = "b1a9684828eae68382d6afc98ce80d24"
+SRC_URI[sha256sum] = "54afc35c672ce451e04a478cfc0eb74c1ba184e27ef24881206602aa0eb94d63"
Signature · 1 line
1.7.0.4
#2 lore raw

PATCH v2 2/4 ccache: Set CCACHE on a per recipe basis

In reply to [email protected]

From: Wenzong Fan <[email protected]>

Set 'CCACHE_DIR' in 'bitbake.conf' and create the dirs for every package before task 'do_configure' started.

---
 meta/classes/base.bbclass |    1 +
 meta/conf/bitbake.conf    |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)
meta/classes/base.bbclass +1 -0
index 119b052..40fbb47 100644
@@ -195,6 +195,7 @@ python base_eventhandler() {
 
 addtask configure after do_unpack do_patch
 do_configure[dirs] = "${S} ${B}"
+do_configure[dirs] =+ "${CCACHE_DIR} "
 do_configure[deptask] = "do_populate_sysroot"
 base_do_configure() {
 	:
meta/conf/bitbake.conf +1 -0
index 6d8a674..d963d2e 100644
@@ -391,6 +391,7 @@ export PATH
 CCACHE = "${@bb.which(bb.data.getVar('PATH', d, 1), 'ccache') and 'ccache '}"
 TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TARGET}"
 
+export CCACHE_DIR = "${TMPDIR}/ccache/${HOST_SYS}/${PN}"
 export CC = "${CCACHE}${HOST_PREFIX}gcc ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}"
 export CXX = "${CCACHE}${HOST_PREFIX}g++ ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}"
 export F77 = "${CCACHE}${HOST_PREFIX}g77 ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}"
Signature · 1 line
1.7.0.4
#3 lore raw

PATCH v2 3/4 ccache: Add 'ccache' for SDK images

In reply to [email protected]

From: Wenzong Fan <[email protected]>

---
 meta/recipes-core/tasks/task-core-sdk.bb |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
meta/recipes-core/tasks/task-core-sdk.bb +1 -0
index 4aee0c2..52fdd75 100644
@@ -25,6 +25,7 @@ RDEPENDS_task-core-sdk = "\
     coreutils \
     cpp \
     cpp-symlinks \
+    ccache \
     diffutils \
     gcc \
     gcc-symlinks \
Signature · 1 line
1.7.0.4
#4 lore raw

PATCH v2 4/4 ccache: Remove duplicate 'ccache.inc' from 'meta/class/'

In reply to [email protected]

From: Wenzong Fan <[email protected]>

---
 meta/classes/ccache.inc |   11 -----------
 1 files changed, 0 insertions(+), 11 deletions(-)
 delete mode 100644 meta/classes/ccache.inc
meta/classes/ccache.inc deleted +0 -11
deleted file mode 100644
index d830a1b..0000000
@@ -1,11 +0,0 @@
-# Make ccache use a TMPDIR specific ccache directory if using the crosscompiler,
-# since it isn't likely to be useful with any other toolchain than the one we just
-# built, and would otherwise push more useful things out of the default cache.
-
-CCACHE_DIR_TARGET = "${TMPDIR}/ccache"
-
-python () {
-    if not bb.data.inherits_class('native', d) and not bb.data.inherits_class('cross', d):
-        bb.data.setVar('CCACHE_DIR', '${CCACHE_DIR_TARGET}', d)
-        bb.data.setVarFlag('CCACHE_DIR', 'export', '1', d)
-}
Signature · 1 line
1.7.0.4
Applied
#5 lore raw
In reply to [email protected]
Quoted 39 lines · On 06/24/2011 02:53 AM, [email protected] wrote:

From: Wenzong Fan<[email protected]>

1) Add ccache as a native tool and put its recipe files to:
'meta/recipes-devtools/ccache';

2) Set 'CCACHE_DIR' in 'bitbake.conf' and create the dirs for every package before task 'do_configure' started;

3) Add 'ccache' for all SDK images;

4) Remove duplicate 'ccache.inc' from 'meta/class/'.

The following changes since commit 7cd2ac0e40d854bab9a32512018aff6172500c0e:
Beth Flanagan (1):
common-licenses: Additions and corrections

are available in the git repository at:

git://git.pokylinux.org/poky-contrib wenzong/ccache
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=wenzong/ccache

Wenzong Fan (4):
ccache: Integrate ccache-native to poky
ccache: Set CCACHE on a per recipe basis
ccache: Add 'ccache' for SDK images
ccache: Remove duplicate 'ccache.inc' from 'meta/class/'

  meta/classes/base.bbclass                    |    1 +
  meta/classes/ccache.inc                      |   11 -----------
  meta/conf/bitbake.conf                       |    1 +
  meta/recipes-core/tasks/task-core-sdk.bb     |    1 +
  meta/recipes-devtools/ccache/ccache.inc      |   16 ++++++++++++++++
  meta/recipes-devtools/ccache/ccache_3.1.5.bb |    8 ++++++++
  6 files changed, 27 insertions(+), 11 deletions(-)

delete mode 100644 meta/classes/ccache.inc
create mode 100644 meta/recipes-devtools/ccache/ccache.inc create mode 100644 meta/recipes-devtools/ccache/ccache_3.1.5.bb

Quoted 5 lines

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

Merged into OE-Core

Thanks
Sau!