<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/meta/classes/ccache.bbclass, branch mickledore-next</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=mickledore-next</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=mickledore-next'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2022-08-12T10:58:01+00:00</updated>
<entry>
<title>classes: Add SPDX license identifiers</title>
<updated>2022-08-12T10:58:01+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2022-08-10T17:55:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=ff525695f27ce2d9033f6f03f6b22fe06aa01960'/>
<id>urn:sha1:ff525695f27ce2d9033f6f03f6b22fe06aa01960</id>
<content type='text'>
As stated in our top level license files, the license is MIT unless
otherwise stated. Add SPDX identifers accordingly. Replace older
license statementa with the standardised syntax. Also drop "All
Rights Reserved" expression as it isn't used now, doesn't mean anything
and is confusing.

(From OE-Core rev: 081a391fe09a21265881e39a2a496e4e10b4f80b)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>classes: Add copyright statements to files without one</title>
<updated>2022-08-12T10:58:01+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2022-08-10T17:21:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=971d5f7b81d535b2da0ae51a54f9ba6641f18304'/>
<id>urn:sha1:971d5f7b81d535b2da0ae51a54f9ba6641f18304</id>
<content type='text'>
Where there isn't a copyright statement, add one to make it explicit.
Also drop editor config lines where they were present.

(From OE-Core rev: 880c1ea3edc8edef974e65b2d424fc36809ea034)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>ccache.bbclass: Use ccache-native and disable ccache for native recipes</title>
<updated>2021-01-20T00:45:05+00:00</updated>
<author>
<name>Robert Yang</name>
<email>liezhi.yang@windriver.com</email>
</author>
<published>2021-01-19T09:23:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=f13a95e17e38e519d9afb3834fcb9c9472132d21'/>
<id>urn:sha1:f13a95e17e38e519d9afb3834fcb9c9472132d21</id>
<content type='text'>
Since host's ccache is not reliable, so disable ccache for native recipes and
use ccache-native for other types of recipes. We need disable ccache for native
recipes is because ccache-native now depends on cmake-native which causes
circular dependencies, and it's not easy to break the circular.

(From OE-Core rev: 631bbd4896882ba2acbe5bc85bc90ab7abc794ef)

Signed-off-by: Robert Yang &lt;liezhi.yang@windriver.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Revert "ccache.bbclass: use ccache from host distribution"</title>
<updated>2021-01-20T00:45:05+00:00</updated>
<author>
<name>Robert Yang</name>
<email>liezhi.yang@windriver.com</email>
</author>
<published>2021-01-19T09:23:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=220a5fcb991d40ebfc8a7fe876ce448b0ac92a47'/>
<id>urn:sha1:220a5fcb991d40ebfc8a7fe876ce448b0ac92a47</id>
<content type='text'>
This reverts commit f5b29367af4d8e5daea5771264774aa49519f9a8.

Will use ccache-native which is more reliable.

(From OE-Core rev: 1b659623430e1a6e6dd266e65bab7ca8155a7138)

Signed-off-by: Robert Yang &lt;liezhi.yang@windriver.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>ccache.bbclass: Set CCACHE_TEMPDIR</title>
<updated>2021-01-08T10:10:15+00:00</updated>
<author>
<name>Robert Yang</name>
<email>liezhi.yang@windriver.com</email>
</author>
<published>2021-01-06T12:09:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=c85bca39db3f9a476682df7f75906b3e1badcf35'/>
<id>urn:sha1:c85bca39db3f9a476682df7f75906b3e1badcf35</id>
<content type='text'>
Fixed when build with buildtools-tarball:

$ bitbake linux-libc-headers
  HOSTCC  arch/x86/tools/relocs_common.o
  ccache: error: Failed to create directory /run/user/0/ccache-tmp: Permission denied

(From OE-Core rev: 98f52dba421cc2e14794e0b811ccac38f0683713)

Signed-off-by: Robert Yang &lt;liezhi.yang@windriver.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>ccache.bbclass: use ccache from host distribution</title>
<updated>2020-12-31T11:53:26+00:00</updated>
<author>
<name>Alexander Kanavin</name>
<email>alex.kanavin@gmail.com</email>
</author>
<published>2020-12-28T20:04:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=95c76b9bd458a10277c9df37d15d86203ec8f10f'/>
<id>urn:sha1:95c76b9bd458a10277c9df37d15d86203ec8f10f</id>
<content type='text'>
ccache 4.x has hard dependencies on cmake-native (used as
build system) and zstd, which means inserting ccache-native
as DEPENDS into everything creates circular dependencies which
are impossible to break.

ccache 3.x did not have this problem as it used plain makefiles
and an in-tree copy of zlib.

(From OE-Core rev: f5b29367af4d8e5daea5771264774aa49519f9a8)

Signed-off-by: Alexander Kanavin &lt;alex.kanavin@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>ccache.bbclass: Set CCACHE_CONFIGPATH to fix race issues</title>
<updated>2019-01-14T11:35:55+00:00</updated>
<author>
<name>Robert Yang</name>
<email>liezhi.yang@windriver.com</email>
</author>
<published>2018-12-17T06:30:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=e96d0200ca3226a3127934ed29c202797d88e4c2'/>
<id>urn:sha1:e96d0200ca3226a3127934ed29c202797d88e4c2</id>
<content type='text'>
Fixed race issues when parallel build:
ccache: error: /path/to/ccache/i586-poky-linux/mmc-utils/ccache.conf: No such file or directory
ccache: error: /path/to/ccache/i586-poky-linux/mmc-utils/ccache.conf: No such file or directory

This is because we set CCACHE_DIR for earch recipe, and ccache will create a
ccache.conf for each CCACHE_DIR when CCACHE_CONFIGPATH is not set, but there
might be a race issue in parallel build:

ccache gcc file1.c
ccache gcc file2.c

If the two ccache processes use fopen(path, "w") to create ccache.conf at the
same time, the error would happen. Set CCACHE_CONFIGPATH to
meta/conf/ccache.conf can fix the problem, and we can add other configs to the
file when needed.

And also set cache_dir_levels to 1 (default is 2) since each recipe has a cache
dir, thus we don't have too many files in one dir.

(From OE-Core rev: 2abbc4d0cd571e82ed6188d3b2d84b4cd6be25e8)

Signed-off-by: Robert Yang &lt;liezhi.yang@windriver.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>ccache.bbclass: Add task do_cleanccache</title>
<updated>2019-01-14T11:35:55+00:00</updated>
<author>
<name>Robert Yang</name>
<email>liezhi.yang@windriver.com</email>
</author>
<published>2018-12-13T09:33:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=7953d6a8bc4beffea7994d6e57f6a5e000ca1889'/>
<id>urn:sha1:7953d6a8bc4beffea7994d6e57f6a5e000ca1889</id>
<content type='text'>
(From OE-Core rev: 36cead66fbadd8c3827aec4b67ea124ee3c2ff94)

Signed-off-by: Robert Yang &lt;liezhi.yang@windriver.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>ccache.bbclass: Make it can be shared between different builds</title>
<updated>2019-01-14T11:35:55+00:00</updated>
<author>
<name>Robert Yang</name>
<email>liezhi.yang@windriver.com</email>
</author>
<published>2018-12-13T09:12:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=e1cad77fa74c828cb08e620aaa4d804df829deeb'/>
<id>urn:sha1:e1cad77fa74c828cb08e620aaa4d804df829deeb</id>
<content type='text'>
CCACHE_BASEDIR: ccache removes this from file path, so that hashes will be
                the same in different build dirs.

CCACHE_TOP_DIR: Set it to a shared location for different builds.

(From OE-Core rev: 35d7fe73bba15de16d2eb0a4b12ef03b57b23306)

Signed-off-by: Robert Yang &lt;liezhi.yang@windriver.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>ccache.bbclass: Refactor it to make it more reliable</title>
<updated>2019-01-14T11:35:55+00:00</updated>
<author>
<name>Robert Yang</name>
<email>liezhi.yang@windriver.com</email>
</author>
<published>2018-12-07T02:55:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=0c98ff2c31d462ea139ebf1a3e0dbd97088d5466'/>
<id>urn:sha1:0c98ff2c31d462ea139ebf1a3e0dbd97088d5466</id>
<content type='text'>
The previous ccache.bbclass has the following problems:
- It uses host's ccache for native recipes, but this may not work on some
  hosts, for example, it nerver works on my Ubuntu 14.04.4, there are always
  build failures (m4-native failed at do_configure, and others will also be
  failed if I disable CCACHE for m4-native)

- native/nativesdk/cross/crosssdk recipes use host's ccache, but target uses
  ccache-native, this may confuse user.

- The target recipes may use both host's ccache and ccache-native, this may
  cause unexpected problems and be hard to debug. This is because ccache-native is
  in SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS, so ccache-native may not be present when
  rebuild target recipes, and then it would use hosttools/ccache, but the
  previous ccache files were generated by ccache-native.

- Target recipes can't use ccache when no ccache is installed on the host:
  CCACHE = "${@bb.utils.which(d.getVar('PATH'), 'ccache') and 'ccache '}"

After refactored:
All types recipes (native, target and others) will use ccache-native except
ccache-native itself, host's cache won't be used any more. It is more
reliable now, which will work everywhere when ccache-native can be built.

And now we need use "CCACHE_DISABLE = '1'" to disable ccache for the recipe
rather than "CCACHE = ''" since we set CCACHE in anonymous function, and
d.getVar('CCACHE') works after "CCACHE ??=" which is set in bitbake.conf, so we
can't check whether CCACHE is set or not in anonymous function since it is
always set. Use CCACHE_DISABLE to disable it would be more clear.

(From OE-Core rev: b25271b65262f70d849a4861da216c9be6c54d53)

Signed-off-by: Robert Yang &lt;liezhi.yang@windriver.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
</feed>
