summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/ccache
diff options
context:
space:
mode:
authorMingli Yu <mingli.yu@windriver.com>2022-06-06 18:50:59 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-06-07 21:21:54 +0100
commit137c0a740471370f9129cb499c7025b4ebefe515 (patch)
tree0df848fa6592d1f5f23ae22afccb0871c9c3ce4b /meta/recipes-devtools/ccache
parent0c855988153f2504f2e79b359cec53b982eb9d52 (diff)
downloadpoky-137c0a740471370f9129cb499c7025b4ebefe515.tar.gz
ccache: Fix build with gcc-12
Fix the build failure when debug build is enabled. Add DEBUG_BUILD = "1" in conf/local.conf. $ bitbake ccache | /buildarea/tmp/work/core2-64-poky-linux/ccache/4.6.1-r0/ccache-4.6.1/src/third_party/xxhash.h:3932:1: error: inlining failed in call to 'always_inline' 'XXH3_accumulate_512_sse2': function not considered for inlining 3932 | XXH3_accumulate_512_sse2( void* XXH_RESTRICT acc, | ^~~~~~~~~~~~~~~~~~~~~~~~ /buildarea/tmp/work/core2-64-poky-linux/ccache/4.6.1-r0/ccache-4.6.1/src/third_party/xxhash.h:4369:9: note: called from here 4369 | f_acc512(acc, | ^~~~~~~~~~~~~ 4370 | in, | ~~~ 4371 | secret + n*XXH_SECRET_CONSUME_RATE); (From OE-Core rev: 4f78045a62d562f2c682695329570faa36ce3e0c) Signed-off-by: Mingli Yu <mingli.yu@windriver.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/ccache')
-rw-r--r--meta/recipes-devtools/ccache/ccache_4.6.1.bb4
-rw-r--r--meta/recipes-devtools/ccache/files/0001-xxhash.h-Fix-build-with-gcc-12.patch39
2 files changed, 42 insertions, 1 deletions
diff --git a/meta/recipes-devtools/ccache/ccache_4.6.1.bb b/meta/recipes-devtools/ccache/ccache_4.6.1.bb
index 418d1070cd..0d6471ddbc 100644
--- a/meta/recipes-devtools/ccache/ccache_4.6.1.bb
+++ b/meta/recipes-devtools/ccache/ccache_4.6.1.bb
@@ -11,7 +11,9 @@ LIC_FILES_CHKSUM = "file://LICENSE.adoc;md5=7a19377a02749d8a1281ed608169b0ee"
11 11
12DEPENDS = "zstd" 12DEPENDS = "zstd"
13 13
14SRC_URI = "https://github.com/ccache/ccache/releases/download/v${PV}/${BP}.tar.gz" 14SRC_URI = "https://github.com/ccache/ccache/releases/download/v${PV}/${BP}.tar.gz \
15 file://0001-xxhash.h-Fix-build-with-gcc-12.patch \
16"
15SRC_URI[sha256sum] = "59b28a57c3a45e48d6049001999c9f94cd4d3e9b0196994bed9a6a7437ffa3bc" 17SRC_URI[sha256sum] = "59b28a57c3a45e48d6049001999c9f94cd4d3e9b0196994bed9a6a7437ffa3bc"
16 18
17UPSTREAM_CHECK_URI = "https://github.com/ccache/ccache/releases/" 19UPSTREAM_CHECK_URI = "https://github.com/ccache/ccache/releases/"
diff --git a/meta/recipes-devtools/ccache/files/0001-xxhash.h-Fix-build-with-gcc-12.patch b/meta/recipes-devtools/ccache/files/0001-xxhash.h-Fix-build-with-gcc-12.patch
new file mode 100644
index 0000000000..4c2623e69d
--- /dev/null
+++ b/meta/recipes-devtools/ccache/files/0001-xxhash.h-Fix-build-with-gcc-12.patch
@@ -0,0 +1,39 @@
1From cfde5ba7d10ae1e9d0c259dd1e7027e9bad8f83c Mon Sep 17 00:00:00 2001
2From: Mingli Yu <mingli.yu@windriver.com>
3Date: Mon, 6 Jun 2022 17:53:20 +0800
4Subject: [PATCH] xxhash.h: Fix build with gcc-12
5
6Remove inline attribute to fix below build failure:
7 | /buildarea/tmp/work/core2-64-poky-linux/ccache/4.6.1-r0/ccache-4.6.1/src/third_party/xxhash.h:3932:1: error: inlining failed in call to 'always_inline' 'XXH3_accumulate_512_sse2': function not considered for inlining
8 3932 | XXH3_accumulate_512_sse2( void* XXH_RESTRICT acc,
9 | ^~~~~~~~~~~~~~~~~~~~~~~~
10 /buildarea/tmp/work/core2-64-poky-linux/ccache/4.6.1-r0/ccache-4.6.1/src/third_party/xxhash.h:4369:9: note: called from here
11 4369 | f_acc512(acc,
12 | ^~~~~~~~~~~~~
13 4370 | in,
14 | ~~~
15 4371 | secret + n*XXH_SECRET_CONSUME_RATE);
16
17Upstream-Status: Submitted [https://github.com/ccache/ccache/pull/1089]
18
19Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
20---
21 src/third_party/xxhash.h | 2 +-
22 1 file changed, 1 insertion(+), 1 deletion(-)
23
24diff --git a/src/third_party/xxhash.h b/src/third_party/xxhash.h
25index 08ab794..c754e99 100644
26--- a/src/third_party/xxhash.h
27+++ b/src/third_party/xxhash.h
28@@ -1501,7 +1501,7 @@ static void* XXH_memcpy(void* dest, const void* src, size_t size)
29 # define XXH_NO_INLINE static
30 /* enable inlining hints */
31 #elif defined(__GNUC__) || defined(__clang__)
32-# define XXH_FORCE_INLINE static __inline__ __attribute__((always_inline, unused))
33+# define XXH_FORCE_INLINE static
34 # define XXH_NO_INLINE static __attribute__((noinline))
35 #elif defined(_MSC_VER) /* Visual Studio */
36 # define XXH_FORCE_INLINE static __forceinline
37--
382.25.1
39