diff options
author | Khem Raj <raj.khem@gmail.com> | 2021-12-07 12:14:23 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-12-08 20:22:11 +0000 |
commit | 921ef297604c78ad5c846f62cb27af69ee9b808e (patch) | |
tree | d6838b2b805e7e0a910924fa93b42244a021bc20 /meta/recipes-graphics/mesa | |
parent | 6fdfe7bc3304c1981ccced74f4daa3f3d9e6dc2d (diff) | |
download | poky-921ef297604c78ad5c846f62cb27af69ee9b808e.tar.gz |
mesa: Fix broadcom vulkan driver build on 32bit arches with 64bit time_t
(From OE-Core rev: 42067ccbf465197ab8d5d6be6d15b71a526decf8)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-graphics/mesa')
-rw-r--r-- | meta/recipes-graphics/mesa/files/0001-v3dv-account-for-64bit-time_t-on-32bit-arches.patch | 41 | ||||
-rw-r--r-- | meta/recipes-graphics/mesa/mesa.inc | 1 |
2 files changed, 42 insertions, 0 deletions
diff --git a/meta/recipes-graphics/mesa/files/0001-v3dv-account-for-64bit-time_t-on-32bit-arches.patch b/meta/recipes-graphics/mesa/files/0001-v3dv-account-for-64bit-time_t-on-32bit-arches.patch new file mode 100644 index 0000000000..e87d7d7311 --- /dev/null +++ b/meta/recipes-graphics/mesa/files/0001-v3dv-account-for-64bit-time_t-on-32bit-arches.patch | |||
@@ -0,0 +1,41 @@ | |||
1 | From e2e2fe86dd61b6fae682a1fec31bd0755ced5cd5 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Tue, 7 Dec 2021 11:13:27 -0800 | ||
4 | Subject: [PATCH] v3dv: account for 64bit time_t on 32bit arches | ||
5 | |||
6 | This makes is a bit more portable, especially on 32bit architectures | ||
7 | with 64bit time_t defaults. Especially on musl its a must. | ||
8 | |||
9 | Fixes | ||
10 | ../mesa-21.3.0/src/broadcom/vulkan/v3dv_bo.c:71:15: error: format specifies type 'long' but the argument has type 'time_t' (aka 'long long') [-Werror,-Wformat] | ||
11 | time.tv_sec); | ||
12 | ^~~~~~~~~~~ | ||
13 | |||
14 | Also reported here [1] | ||
15 | |||
16 | [1] https://github.com/agherzan/meta-raspberrypi/issues/969 | ||
17 | |||
18 | Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14118] | ||
19 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
20 | --- | ||
21 | src/broadcom/vulkan/v3dv_bo.c | 4 ++-- | ||
22 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
23 | |||
24 | diff --git a/src/broadcom/vulkan/v3dv_bo.c b/src/broadcom/vulkan/v3dv_bo.c | ||
25 | index 71679ce..dc5e7f5 100644 | ||
26 | --- a/src/broadcom/vulkan/v3dv_bo.c | ||
27 | +++ b/src/broadcom/vulkan/v3dv_bo.c | ||
28 | @@ -67,8 +67,8 @@ bo_dump_stats(struct v3dv_device *device) | ||
29 | |||
30 | struct timespec time; | ||
31 | clock_gettime(CLOCK_MONOTONIC, &time); | ||
32 | - fprintf(stderr, " now: %ld\n", | ||
33 | - time.tv_sec); | ||
34 | + fprintf(stderr, " now: %lld\n", | ||
35 | + (long long)time.tv_sec); | ||
36 | } | ||
37 | |||
38 | if (cache->size_list_size) { | ||
39 | -- | ||
40 | 2.34.1 | ||
41 | |||
diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc index 30b9e93f63..31ff38dfdc 100644 --- a/meta/recipes-graphics/mesa/mesa.inc +++ b/meta/recipes-graphics/mesa/mesa.inc | |||
@@ -20,6 +20,7 @@ SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \ | |||
20 | file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \ | 20 | file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \ |
21 | file://0001-futex.h-Define-__NR_futex-if-it-does-not-exist.patch \ | 21 | file://0001-futex.h-Define-__NR_futex-if-it-does-not-exist.patch \ |
22 | file://0001-util-format-Check-for-NEON-before-using-it.patch \ | 22 | file://0001-util-format-Check-for-NEON-before-using-it.patch \ |
23 | file://0001-v3dv-account-for-64bit-time_t-on-32bit-arches.patch \ | ||
23 | " | 24 | " |
24 | 25 | ||
25 | SRC_URI[sha256sum] = "a2753c09deef0ba14d35ae8a2ceff3fe5cd13698928c7bb62c2ec8736eb09ce1" | 26 | SRC_URI[sha256sum] = "a2753c09deef0ba14d35ae8a2ceff3fe5cd13698928c7bb62c2ec8736eb09ce1" |