summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/mesa
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2019-12-04 14:48:45 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-12-28 14:05:27 +0000
commit32ea66252073a5253996a22bae5d02bddbaf30fc (patch)
tree03fb009326f76dc56f3fd1757370d616fb63bcb2 /meta/recipes-graphics/mesa
parent120e687bad03ad2cf4df4092e8a3f35a569e09f4 (diff)
downloadopenembedded-core-contrib-32ea66252073a5253996a22bae5d02bddbaf30fc.tar.gz
mesa: Fix vc4 build for 64bit time_t changes on 32bit arches
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/recipes-graphics/mesa')
-rw-r--r--meta/recipes-graphics/mesa/files/0005-vc4-use-intmax_t-for-formatted-output-of-timespec-me.patch53
-rw-r--r--meta/recipes-graphics/mesa/mesa_19.2.4.bb1
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 @@
+From 38a313474e127d61e749866423e708fc86ed9ec5 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 4 Dec 2019 14:15:28 -0800
+Subject: [PATCH] vc4: use intmax_t for formatted output of timespec members
+
+32bit architectures which have 64bit time_t does not fit the assumption
+of time_t being same as system long int
+
+Fixes
+error: format specifies type 'long' but the argument has type 'time_t' (aka 'long long') [-Werror,-Wformat]
+ time.tv_sec);
+ ^~~~~~~~~~~
+
+Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2966]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/gallium/drivers/v3d/v3d_bufmgr.c | 4 ++--
+ src/gallium/drivers/vc4/vc4_bufmgr.c | 4 ++--
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/src/gallium/drivers/v3d/v3d_bufmgr.c b/src/gallium/drivers/v3d/v3d_bufmgr.c
+index b3e4d053cc0..c514bf00bf0 100644
+--- a/src/gallium/drivers/v3d/v3d_bufmgr.c
++++ b/src/gallium/drivers/v3d/v3d_bufmgr.c
+@@ -80,8 +80,8 @@ v3d_bo_dump_stats(struct v3d_screen *screen)
+
+ struct timespec time;
+ clock_gettime(CLOCK_MONOTONIC, &time);
+- fprintf(stderr, " now: %ld\n",
+- time.tv_sec);
++ fprintf(stderr, " now: %jd\n",
++ (intmax_t)time.tv_sec);
+ }
+ }
+
+diff --git a/src/gallium/drivers/vc4/vc4_bufmgr.c b/src/gallium/drivers/vc4/vc4_bufmgr.c
+index 5ec360934c0..bf05f6cadd6 100644
+--- a/src/gallium/drivers/vc4/vc4_bufmgr.c
++++ b/src/gallium/drivers/vc4/vc4_bufmgr.c
+@@ -107,8 +107,8 @@ vc4_bo_dump_stats(struct vc4_screen *screen)
+
+ struct timespec time;
+ clock_gettime(CLOCK_MONOTONIC, &time);
+- fprintf(stderr, " now: %ld\n",
+- time.tv_sec);
++ fprintf(stderr, " now: %jd\n",
++ (intmax_t)time.tv_sec);
+ }
+ }
+
+--
+2.24.0
+
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 \
file://0002-meson.build-make-TLS-ELF-optional.patch \
file://0003-Allow-enable-DRI-without-DRI-drivers.patch \
file://0004-Revert-mesa-Enable-asm-unconditionally-now-that-gen_.patch \
+ file://0005-vc4-use-intmax_t-for-formatted-output-of-timespec-me.patch \
"
SRC_URI[md5sum] = "5c047732b81651ddb341597528b4b096"