[meta-oe,4/7] glmark2: Fix build with gcc12

Message ID 20220412220316.3876985-4-raj.khem@gmail.com
State New
Headers show
Series [meta-oe,1/7] libkcapi: Upgrade to 1.4.0 | expand

Commit Message

Khem Raj April 12, 2022, 10:03 p.m. UTC
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...atrix-Include-missing-utility-header.patch | 24 +++++++++++++++++++
 .../recipes-benchmark/glmark2/glmark2_git.bb  |  1 +
 2 files changed, 25 insertions(+)
 create mode 100644 meta-oe/recipes-benchmark/glmark2/files/0001-libmatrix-Include-missing-utility-header.patch

Patch

diff --git a/meta-oe/recipes-benchmark/glmark2/files/0001-libmatrix-Include-missing-utility-header.patch b/meta-oe/recipes-benchmark/glmark2/files/0001-libmatrix-Include-missing-utility-header.patch
new file mode 100644
index 0000000000..959a18e5eb
--- /dev/null
+++ b/meta-oe/recipes-benchmark/glmark2/files/0001-libmatrix-Include-missing-utility-header.patch
@@ -0,0 +1,24 @@ 
+From 45cb02332b38b2059e7e44369c3d8684492a7def Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 12 Apr 2022 11:41:41 -0700
+Subject: [PATCH] libmatrix: Include missing <utility> header
+
+Fixes build with gcc12
+| ../git/src/libmatrix/program.h:43:21: error: 'exchange' is not a member of 'std'                                                   |    43 |         ready_(std::exchange(shader.ready_, false)),                                                                       |       |                     ^~~~~~~~
+
+Upstream-Status: Submitted [https://github.com/glmark2/glmark2/pull/174]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/libmatrix/program.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/src/libmatrix/program.h
++++ b/src/libmatrix/program.h
+@@ -13,6 +13,7 @@
+ #define PROGRAM_H_
+ 
+ #include <string>
++#include <utility>
+ #include <vector>
+ #include <map>
+ #include "mat.h"
diff --git a/meta-oe/recipes-benchmark/glmark2/glmark2_git.bb b/meta-oe/recipes-benchmark/glmark2/glmark2_git.bb
index 47d927397c..1406f68b05 100644
--- a/meta-oe/recipes-benchmark/glmark2/glmark2_git.bb
+++ b/meta-oe/recipes-benchmark/glmark2/glmark2_git.bb
@@ -17,6 +17,7 @@  SRC_URI = " \
     git://github.com/glmark2/glmark2.git;protocol=https;branch=master \
     file://0001-fix-dispmanx-build.patch \
     file://0002-run-dispmanx-fullscreen.patch \
+    file://0001-libmatrix-Include-missing-utility-header.patch \
     "
 SRCREV = "0858b450cd88c84a15b99dda9698d44e7f7e8c70"