Helps in fixing build issues when default std of C++
compiler is older

Signed-off-by: Khem Raj <raj.k...@gmail.com>
---
 .../0001-build-Specify-std-c-11-on-cmdline.patch   | 45 ++++++++++++++++++++++
 .../glcompbench/glcompbench_2012.08.bb             |  4 +-
 2 files changed, 48 insertions(+), 1 deletion(-)
 create mode 100644 
meta-oe/recipes-graphics/glcompbench/glcompbench/0001-build-Specify-std-c-11-on-cmdline.patch

diff --git 
a/meta-oe/recipes-graphics/glcompbench/glcompbench/0001-build-Specify-std-c-11-on-cmdline.patch
 
b/meta-oe/recipes-graphics/glcompbench/glcompbench/0001-build-Specify-std-c-11-on-cmdline.patch
new file mode 100644
index 0000000..ffbc297
--- /dev/null
+++ 
b/meta-oe/recipes-graphics/glcompbench/glcompbench/0001-build-Specify-std-c-11-on-cmdline.patch
@@ -0,0 +1,45 @@
+From 47bfef0dd83ed2e10ec4c615908ec926c4d5fe2e Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.k...@gmail.com>
+Date: Wed, 19 Oct 2016 00:56:54 +0000
+Subject: [PATCH] build: Specify -std=c++11 on cmdline
+
+We use c++11 features so demand it explicitly from compiler
+
+Fixes
+| ../src/libmatrix/shader-source.cc:37:10: error: no member named 'unique_ptr' 
in namespace 'std'
+|     std::unique_ptr<std::istream> is_ptr(Util::get_resource(filename));
+|     ~~~~~^
+| ../src/libmatrix/shader-source.cc:37:33: error: expected '(' for 
function-style cast or type construction
+|     std::unique_ptr<std::istream> is_ptr(Util::get_resource(filename));
+|                     ~~~~~~~~~~~~^
+| ../src/libmatrix/shader-source.cc:37:35: error: use of undeclared identifier 
'is_ptr'
+|     std::unique_ptr<std::istream> is_ptr(Util::get_resource(filename));
+|                                   ^
+| ../src/libmatrix/shader-source.cc:38:30: error: use of undeclared identifier 
'is_ptr'
+|     std::istream& inputFile(*is_ptr);
+|                              ^
+| 4 errors generated.
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.k...@gmail.com>
+---
+ wscript | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/wscript b/wscript
+index dcaf298..485a9fb 100644
+--- a/wscript
++++ b/wscript
+@@ -79,7 +79,7 @@ def configure(ctx):
+             ctx.check_cfg(package = pkg, uselib_store = uselib, args = 
'--cflags --libs',
+                           mandatory = True)
+ 
+-    ctx.env.append_unique('CXXFLAGS', '-Wall -Werror -Wextra'.split(' '))
++    ctx.env.append_unique('CXXFLAGS', '-Wall -Werror -std=c++11 
-Wextra'.split(' '))
+ 
+     # Prepend -O# and -g flags so that they can be overriden by the CFLAGS 
environment variable
+     if Options.options.opt:
+-- 
+1.9.1
+
diff --git a/meta-oe/recipes-graphics/glcompbench/glcompbench_2012.08.bb 
b/meta-oe/recipes-graphics/glcompbench/glcompbench_2012.08.bb
index 35fb4ad..7cf9692 100755
--- a/meta-oe/recipes-graphics/glcompbench/glcompbench_2012.08.bb
+++ b/meta-oe/recipes-graphics/glcompbench/glcompbench_2012.08.bb
@@ -9,7 +9,9 @@ SRC_URI = 
"https://launchpad.net/glcompbench/trunk/${PV}/+download/${BPN}-${PV}.
            file://glbench-compile-fix.patch \
            file://Fix-configure-for-sqrt-check.patch \
            file://Fix_space_issues.patch \
-           file://Fix_auto_ptr_deprecated.patch"
+           file://Fix_auto_ptr_deprecated.patch \
+           file://0001-build-Specify-std-c-11-on-cmdline.patch \
+"
 
 SRC_URI[md5sum] = "c939d9156fe940960098f38707fea827"
 SRC_URI[sha256sum] = 
"b04b738cec06c6786ceafa86e4735fd8b971c078265754854ef356b0379542ee"
-- 
2.10.0

-- 
_______________________________________________
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

Reply via email to