diff options
author | Khem Raj <raj.khem@gmail.com> | 2019-12-04 14:48:45 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-12-28 23:25:41 +0000 |
commit | ba013503ced1b21d11926c1c439132c459ffa85f (patch) | |
tree | 142897ec969446c72ec19bca2e5733d630c41c06 /meta/recipes-graphics | |
parent | 42fe4c90683c778972981335864879fb3dcb2109 (diff) | |
download | poky-ba013503ced1b21d11926c1c439132c459ffa85f.tar.gz |
mesa: Fix vc4 build for 64bit time_t changes on 32bit arches
(From OE-Core rev: 32ea66252073a5253996a22bae5d02bddbaf30fc)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-graphics')
-rw-r--r-- | meta/recipes-graphics/mesa/files/0005-vc4-use-intmax_t-for-formatted-output-of-timespec-me.patch | 53 | ||||
-rw-r--r-- | meta/recipes-graphics/mesa/mesa_19.2.4.bb | 1 |
2 files changed, 54 insertions, 0 deletions
diff --git a/meta/recipes-graphics/mesa/files/0005-vc4-use-intmax_t-for-formatted-output-of-timespec-me.patch b/meta/recipes-graphics/mesa/files/0005-vc4-use-intmax_t-for-formatted-output-of-timespec-me.patch new file mode 100644 index 0000000000..901feca556 --- /dev/null +++ b/meta/recipes-graphics/mesa/files/0005-vc4-use-intmax_t-for-formatted-output-of-timespec-me.patch | |||
@@ -0,0 +1,53 @@ | |||
1 | From 38a313474e127d61e749866423e708fc86ed9ec5 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 4 Dec 2019 14:15:28 -0800 | ||
4 | Subject: [PATCH] vc4: use intmax_t for formatted output of timespec members | ||
5 | |||
6 | 32bit architectures which have 64bit time_t does not fit the assumption | ||
7 | of time_t being same as system long int | ||
8 | |||
9 | Fixes | ||
10 | error: format specifies type 'long' but the argument has type 'time_t' (aka 'long long') [-Werror,-Wformat] | ||
11 | time.tv_sec); | ||
12 | ^~~~~~~~~~~ | ||
13 | |||
14 | Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2966] | ||
15 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
16 | --- | ||
17 | src/gallium/drivers/v3d/v3d_bufmgr.c | 4 ++-- | ||
18 | src/gallium/drivers/vc4/vc4_bufmgr.c | 4 ++-- | ||
19 | 2 files changed, 4 insertions(+), 4 deletions(-) | ||
20 | |||
21 | diff --git a/src/gallium/drivers/v3d/v3d_bufmgr.c b/src/gallium/drivers/v3d/v3d_bufmgr.c | ||
22 | index b3e4d053cc0..c514bf00bf0 100644 | ||
23 | --- a/src/gallium/drivers/v3d/v3d_bufmgr.c | ||
24 | +++ b/src/gallium/drivers/v3d/v3d_bufmgr.c | ||
25 | @@ -80,8 +80,8 @@ v3d_bo_dump_stats(struct v3d_screen *screen) | ||
26 | |||
27 | struct timespec time; | ||
28 | clock_gettime(CLOCK_MONOTONIC, &time); | ||
29 | - fprintf(stderr, " now: %ld\n", | ||
30 | - time.tv_sec); | ||
31 | + fprintf(stderr, " now: %jd\n", | ||
32 | + (intmax_t)time.tv_sec); | ||
33 | } | ||
34 | } | ||
35 | |||
36 | diff --git a/src/gallium/drivers/vc4/vc4_bufmgr.c b/src/gallium/drivers/vc4/vc4_bufmgr.c | ||
37 | index 5ec360934c0..bf05f6cadd6 100644 | ||
38 | --- a/src/gallium/drivers/vc4/vc4_bufmgr.c | ||
39 | +++ b/src/gallium/drivers/vc4/vc4_bufmgr.c | ||
40 | @@ -107,8 +107,8 @@ vc4_bo_dump_stats(struct vc4_screen *screen) | ||
41 | |||
42 | struct timespec time; | ||
43 | clock_gettime(CLOCK_MONOTONIC, &time); | ||
44 | - fprintf(stderr, " now: %ld\n", | ||
45 | - time.tv_sec); | ||
46 | + fprintf(stderr, " now: %jd\n", | ||
47 | + (intmax_t)time.tv_sec); | ||
48 | } | ||
49 | } | ||
50 | |||
51 | -- | ||
52 | 2.24.0 | ||
53 | |||
diff --git a/meta/recipes-graphics/mesa/mesa_19.2.4.bb b/meta/recipes-graphics/mesa/mesa_19.2.4.bb index f4b33df227..46ecee3a73 100644 --- a/meta/recipes-graphics/mesa/mesa_19.2.4.bb +++ b/meta/recipes-graphics/mesa/mesa_19.2.4.bb | |||
@@ -5,6 +5,7 @@ SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \ | |||
5 | file://0002-meson.build-make-TLS-ELF-optional.patch \ | 5 | file://0002-meson.build-make-TLS-ELF-optional.patch \ |
6 | file://0003-Allow-enable-DRI-without-DRI-drivers.patch \ | 6 | file://0003-Allow-enable-DRI-without-DRI-drivers.patch \ |
7 | file://0004-Revert-mesa-Enable-asm-unconditionally-now-that-gen_.patch \ | 7 | file://0004-Revert-mesa-Enable-asm-unconditionally-now-that-gen_.patch \ |
8 | file://0005-vc4-use-intmax_t-for-formatted-output-of-timespec-me.patch \ | ||
8 | " | 9 | " |
9 | 10 | ||
10 | SRC_URI[md5sum] = "5c047732b81651ddb341597528b4b096" | 11 | SRC_URI[md5sum] = "5c047732b81651ddb341597528b4b096" |