summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/ccache/files/0001-xxhash.h-Fix-build-with-gcc-12.patch
blob: 67c74a1e8e3392694269d4845abc2728a29d7dd1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
From 550834a3ec2e05e379be63b084e7fa06a1723f84 Mon Sep 17 00:00:00 2001
From: Mingli Yu <mingli.yu@windriver.com>
Date: Mon, 6 Jun 2022 17:53:20 +0800
Subject: [PATCH] xxhash.h: Fix build with gcc-12

Remove inline attribute to fix below build failure:
  | /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);

Upstream-Status: Submitted [https://github.com/Cyan4973/xxHash/pull/720]

Signed-off-by: Mingli Yu <mingli.yu@windriver.com>

---
 src/third_party/xxhash.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/third_party/xxhash.h b/src/third_party/xxhash.h
index 08ab794..c754e99 100644
--- a/src/third_party/xxhash.h
+++ b/src/third_party/xxhash.h
@@ -1501,7 +1501,7 @@ static void* XXH_memcpy(void* dest, const void* src, size_t size)
 #  define XXH_NO_INLINE static
 /* enable inlining hints */
 #elif defined(__GNUC__) || defined(__clang__)
-#  define XXH_FORCE_INLINE static __inline__ __attribute__((always_inline, unused))
+#  define XXH_FORCE_INLINE static
 #  define XXH_NO_INLINE static __attribute__((noinline))
 #elif defined(_MSC_VER)  /* Visual Studio */
 #  define XXH_FORCE_INLINE static __forceinline