summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-oe/recipes-support/googlebenchmark/googlebenchmark/0001-cycleclock-Fix-type-conversion-to-match-function-ret.patch33
-rw-r--r--meta-oe/recipes-support/googlebenchmark/googlebenchmark/0002-cycleclock-Fix-type-conversion-to-match-function-ret.patch32
-rw-r--r--meta-oe/recipes-support/googlebenchmark/googlebenchmark_1.9.1.bb (renamed from meta-oe/recipes-support/googlebenchmark/googlebenchmark_1.8.4.bb)6
3 files changed, 2 insertions, 69 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
deleted file mode 100644
index 3017314abe..0000000000
--- a/meta-oe/recipes-support/googlebenchmark/googlebenchmark/0001-cycleclock-Fix-type-conversion-to-match-function-ret.patch
+++ /dev/null
@@ -1,33 +0,0 @@
1From 7f0e99af540a333108b92d792923ec7fc9e9fad9 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 28 May 2024 20:14:54 -0700
4Subject: [PATCH] cycleclock: Fix type conversion to match function return type
5 (#1794)
6
7fixes build with clang19
8
9src/cycleclock.h:208:52: error: implicit conversion changes signedness: 'uint64_t' (aka 'unsigned long long') to 'int64_t' (aka 'long long') [-Werror,-Wsign-conversion]
10 208 | return (static_cast<uint64_t>(cycles_hi1) << 32) | cycles_lo;
11 | ~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
121 error generated.
13
14Upstream-Status: Backport [https://github.com/google/benchmark/commit/7f0e99af540a333108b92d792923ec7fc9e9fad9]
15Signed-off-by: Khem Raj <raj.khem@gmail.com>
16---
17 src/cycleclock.h | 3 ++-
18 1 file changed, 2 insertions(+), 1 deletion(-)
19
20diff --git a/src/cycleclock.h b/src/cycleclock.h
21index a25843760..c657414e5 100644
22--- a/src/cycleclock.h
23+++ b/src/cycleclock.h
24@@ -205,7 +205,8 @@ inline BENCHMARK_ALWAYS_INLINE int64_t Now() {
25 "sub %0, zero, %0\n"
26 "and %1, %1, %0\n"
27 : "=r"(cycles_hi0), "=r"(cycles_lo), "=r"(cycles_hi1));
28- return (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);
31 #else
32 uint64_t cycles;
33 asm volatile("rdtime %0" : "=r"(cycles));
diff --git a/meta-oe/recipes-support/googlebenchmark/googlebenchmark/0002-cycleclock-Fix-type-conversion-to-match-function-ret.patch b/meta-oe/recipes-support/googlebenchmark/googlebenchmark/0002-cycleclock-Fix-type-conversion-to-match-function-ret.patch
deleted file mode 100644
index cc22a7e8a9..0000000000
--- a/meta-oe/recipes-support/googlebenchmark/googlebenchmark/0002-cycleclock-Fix-type-conversion-to-match-function-ret.patch
+++ /dev/null
@@ -1,32 +0,0 @@
1From 54bca09aca6ccec41f852cb1f834463bc51290d0 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 10 Jun 2024 21:45:22 -0700
4Subject: [PATCH] cycleclock: Fix type conversion to match function return type
5 on riscv64
6
7Fixes builds with clang
8
9src/cycleclock.h:213:10: error: implicit conversion changes signedness: 'uint64_t' (aka 'unsigned long') to 'int64_t' (aka 'long') [-Werror,-Wsign-conversion]
10 213 | return cycles;
11 | ~~~~~~ ^~~~~~
12 1 error generated.
13
14Upstream-Status: Submitted [https://github.com/google/benchmark/pull/1802]
15Signed-off-by: Khem Raj <raj.khem@gmail.com>
16---
17 src/cycleclock.h | 2 +-
18 1 file changed, 1 insertion(+), 1 deletion(-)
19
20diff --git a/src/cycleclock.h b/src/cycleclock.h
21index c657414..bd62f5d 100644
22--- a/src/cycleclock.h
23+++ b/src/cycleclock.h
24@@ -210,7 +210,7 @@ inline BENCHMARK_ALWAYS_INLINE int64_t Now() {
25 #else
26 uint64_t cycles;
27 asm volatile("rdtime %0" : "=r"(cycles));
28- return cycles;
29+ return static_cast<int64_t>(cycles);
30 #endif
31 #elif defined(__e2k__) || defined(__elbrus__)
32 struct timeval tv;
diff --git a/meta-oe/recipes-support/googlebenchmark/googlebenchmark_1.8.4.bb b/meta-oe/recipes-support/googlebenchmark/googlebenchmark_1.9.1.bb
index 706862f24a..adab241baa 100644
--- a/meta-oe/recipes-support/googlebenchmark/googlebenchmark_1.8.4.bb
+++ b/meta-oe/recipes-support/googlebenchmark/googlebenchmark_1.9.1.bb
@@ -4,10 +4,8 @@ SECTION = "libs"
4LICENSE = "Apache-2.0" 4LICENSE = "Apache-2.0"
5LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" 5LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
6 6
7SRC_URI = "git://github.com/google/benchmark.git;protocol=https;branch=main \ 7SRC_URI = "git://github.com/google/benchmark.git;protocol=https;branch=main"
8 file://0001-cycleclock-Fix-type-conversion-to-match-function-ret.patch \ 8SRCREV = "c58e6d0710581e3a08d65c349664128a8d9a2461"
9 file://0002-cycleclock-Fix-type-conversion-to-match-function-ret.patch"
10SRCREV = "a4cf155615c63e019ae549e31703bf367df5b471"
11 9
12S = "${WORKDIR}/git" 10S = "${WORKDIR}/git"
13 11