diff options
author | Robert Yang <liezhi.yang@windriver.com> | 2021-01-19 01:23:43 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-01-20 00:45:05 +0000 |
commit | 220a5fcb991d40ebfc8a7fe876ce448b0ac92a47 (patch) | |
tree | c146abab376a24b3f3088e54820d597d58a6a488 | |
parent | 496d8492249bdf01ac84715486e02cbfb3b8059a (diff) | |
download | poky-220a5fcb991d40ebfc8a7fe876ce448b0ac92a47.tar.gz |
Revert "ccache.bbclass: use ccache from host distribution"
This reverts commit f5b29367af4d8e5daea5771264774aa49519f9a8.
Will use ccache-native which is more reliable.
(From OE-Core rev: 1b659623430e1a6e6dd266e65bab7ca8155a7138)
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/ccache.bbclass | 3 | ||||
-rw-r--r-- | meta/conf/bitbake.conf | 2 | ||||
-rw-r--r-- | meta/lib/oeqa/selftest/cases/buildoptions.py | 8 |
3 files changed, 6 insertions, 7 deletions
diff --git a/meta/classes/ccache.bbclass b/meta/classes/ccache.bbclass index f00fafc292..fc4745609c 100644 --- a/meta/classes/ccache.bbclass +++ b/meta/classes/ccache.bbclass | |||
@@ -1,7 +1,5 @@ | |||
1 | # | 1 | # |
2 | # Usage: | 2 | # Usage: |
3 | # - Install ccache package on the host distribution and set up a build directory | ||
4 | # | ||
5 | # - Enable ccache | 3 | # - Enable ccache |
6 | # Add the following line to a conffile such as conf/local.conf: | 4 | # Add the following line to a conffile such as conf/local.conf: |
7 | # INHERIT += "ccache" | 5 | # INHERIT += "ccache" |
@@ -53,6 +51,7 @@ python() { | |||
53 | # quilt-native doesn't need ccache since no c files | 51 | # quilt-native doesn't need ccache since no c files |
54 | if not (pn in ('ccache-native', 'quilt-native') or | 52 | if not (pn in ('ccache-native', 'quilt-native') or |
55 | bb.utils.to_boolean(d.getVar('CCACHE_DISABLE'))): | 53 | bb.utils.to_boolean(d.getVar('CCACHE_DISABLE'))): |
54 | d.appendVar('DEPENDS', ' ccache-native') | ||
56 | d.setVar('CCACHE', 'ccache ') | 55 | d.setVar('CCACHE', 'ccache ') |
57 | } | 56 | } |
58 | 57 | ||
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf index be94b78eb1..74976ac05c 100644 --- a/meta/conf/bitbake.conf +++ b/meta/conf/bitbake.conf | |||
@@ -498,7 +498,7 @@ HOSTTOOLS += " \ | |||
498 | HOSTTOOLS += "${@'ip ping ps scp ssh stty' if (bb.utils.contains_any('IMAGE_CLASSES', 'testimage testsdk', True, False, d) or any(x in (d.getVar("BBINCLUDED") or "") for x in ["testimage.bbclass", "testsdk.bbclass"])) else ''}" | 498 | HOSTTOOLS += "${@'ip ping ps scp ssh stty' if (bb.utils.contains_any('IMAGE_CLASSES', 'testimage testsdk', True, False, d) or any(x in (d.getVar("BBINCLUDED") or "") for x in ["testimage.bbclass", "testsdk.bbclass"])) else ''}" |
499 | 499 | ||
500 | # Link to these if present | 500 | # Link to these if present |
501 | HOSTTOOLS_NONFATAL += "aws ccache gcc-ar gpg ld.bfd ld.gold nc pigz sftp socat ssh sudo" | 501 | HOSTTOOLS_NONFATAL += "aws gcc-ar gpg ld.bfd ld.gold nc pigz sftp socat ssh sudo" |
502 | 502 | ||
503 | # Temporary add few more detected in bitbake world | 503 | # Temporary add few more detected in bitbake world |
504 | HOSTTOOLS_NONFATAL += "join nl size yes zcat" | 504 | HOSTTOOLS_NONFATAL += "join nl size yes zcat" |
diff --git a/meta/lib/oeqa/selftest/cases/buildoptions.py b/meta/lib/oeqa/selftest/cases/buildoptions.py index d0f6477300..e91f0bd18f 100644 --- a/meta/lib/oeqa/selftest/cases/buildoptions.py +++ b/meta/lib/oeqa/selftest/cases/buildoptions.py | |||
@@ -33,10 +33,10 @@ class ImageOptionsTests(OESelftestTestCase): | |||
33 | self.assertTrue(incremental_removed, msg = "Match failed in:\n%s" % log_data_removed) | 33 | self.assertTrue(incremental_removed, msg = "Match failed in:\n%s" % log_data_removed) |
34 | 34 | ||
35 | def test_ccache_tool(self): | 35 | def test_ccache_tool(self): |
36 | bb_vars = get_bb_vars(['HOSTTOOLS_DIR'], 'm4-native') | 36 | bitbake("ccache-native") |
37 | p = bb_vars['HOSTTOOLS_DIR'] + "/" + "ccache" | 37 | bb_vars = get_bb_vars(['SYSROOT_DESTDIR', 'bindir'], 'ccache-native') |
38 | if not os.path.isfile(p): | 38 | p = bb_vars['SYSROOT_DESTDIR'] + bb_vars['bindir'] + "/" + "ccache" |
39 | self.skipTest("No ccache binary found in %s" % bb_vars['HOSTTOOLS_DIR']) | 39 | self.assertTrue(os.path.isfile(p), msg = "No ccache found (%s)" % p) |
40 | self.write_config('INHERIT += "ccache"') | 40 | self.write_config('INHERIT += "ccache"') |
41 | self.add_command_to_tearDown('bitbake -c clean m4-native') | 41 | self.add_command_to_tearDown('bitbake -c clean m4-native') |
42 | bitbake("m4-native -c clean") | 42 | bitbake("m4-native -c clean") |