summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-oe/recipes-support/googlebenchmark/googlebenchmark/0001-cycleclock-Fix-type-conversion-to-match-function-ret.patch21
1 files changed, 10 insertions, 11 deletions
diff --git a/meta-oe/recipes-support/googlebenchmark/googlebenchmark/0001-cycleclock-Fix-type-conversion-to-match-function-ret.patch b/meta-oe/recipes-support/googlebenchmark/googlebenchmark/0001-cycleclock-Fix-type-conversion-to-match-function-ret.patch
index d514cf192b..3017314abe 100644
--- a/meta-oe/recipes-support/googlebenchmark/googlebenchmark/0001-cycleclock-Fix-type-conversion-to-match-function-ret.patch
+++ b/meta-oe/recipes-support/googlebenchmark/googlebenchmark/0001-cycleclock-Fix-type-conversion-to-match-function-ret.patch
@@ -1,7 +1,8 @@
1From db704bcc344529039d7fb28be380658625a9c08d Mon Sep 17 00:00:00 2001 1From 7f0e99af540a333108b92d792923ec7fc9e9fad9 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 28 May 2024 19:34:43 -0700 3Date: Tue, 28 May 2024 20:14:54 -0700
4Subject: [PATCH] cycleclock: Fix type conversion to match function return type 4Subject: [PATCH] cycleclock: Fix type conversion to match function return type
5 (#1794)
5 6
6fixes build with clang19 7fixes build with clang19
7 8
@@ -10,25 +11,23 @@ src/cycleclock.h:208:52: error: implicit conversion changes signedness: 'uint64_
10 | ~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~ 11 | ~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
111 error generated. 121 error generated.
12 13
13Upstream-Status: Submitted [https://github.com/google/benchmark/pull/1794] 14Upstream-Status: Backport [https://github.com/google/benchmark/commit/7f0e99af540a333108b92d792923ec7fc9e9fad9]
14Signed-off-by: Khem Raj <raj.khem@gmail.com> 15Signed-off-by: Khem Raj <raj.khem@gmail.com>
15--- 16---
16 src/cycleclock.h | 2 +- 17 src/cycleclock.h | 3 ++-
17 1 file changed, 1 insertion(+), 1 deletion(-) 18 1 file changed, 2 insertions(+), 1 deletion(-)
18 19
19diff --git a/src/cycleclock.h b/src/cycleclock.h 20diff --git a/src/cycleclock.h b/src/cycleclock.h
20index a2584376..f96801c5 100644 21index a25843760..c657414e5 100644
21--- a/src/cycleclock.h 22--- a/src/cycleclock.h
22+++ b/src/cycleclock.h 23+++ b/src/cycleclock.h
23@@ -205,7 +205,7 @@ inline BENCHMARK_ALWAYS_INLINE int64_t Now() { 24@@ -205,7 +205,8 @@ inline BENCHMARK_ALWAYS_INLINE int64_t Now() {
24 "sub %0, zero, %0\n" 25 "sub %0, zero, %0\n"
25 "and %1, %1, %0\n" 26 "and %1, %1, %0\n"
26 : "=r"(cycles_hi0), "=r"(cycles_lo), "=r"(cycles_hi1)); 27 : "=r"(cycles_hi0), "=r"(cycles_lo), "=r"(cycles_hi1));
27- return (static_cast<uint64_t>(cycles_hi1) << 32) | cycles_lo; 28- return (static_cast<uint64_t>(cycles_hi1) << 32) | cycles_lo;
28+ return static_cast<int64_t>((static_cast<uint64_t>(cycles_hi1) << 32) | cycles_lo); 29+ return static_cast<int64_t>((static_cast<uint64_t>(cycles_hi1) << 32) |
30+ cycles_lo);
29 #else 31 #else
30 uint64_t cycles; 32 uint64_t cycles;
31 asm volatile("rdtime %0" : "=r"(cycles)); 33 asm volatile("rdtime %0" : "=r"(cycles));
32--
332.45.1
34