[oe-commits] [meta-openembedded] 32/57: frame: Fix build with clang

git at git.openembedded.org git at git.openembedded.org
Tue Oct 25 13:34:39 UTC 2016


martin_jansa pushed a commit to branch master-next
in repository meta-openembedded.

commit 04b649d0aa329d490f8e8b6a7d52041b420fbb0b
Author: Khem Raj <raj.khem at gmail.com>
AuthorDate: Tue Oct 18 22:38:23 2016 -0700

    frame: Fix build with clang
    
    Signed-off-by: Khem Raj <raj.khem at gmail.com>
    Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>
---
 .../frame/pessimizing-move.patch                   | 27 ++++++++++++++++++++++
 .../canonical-multitouch/frame_2.5.0.bb            |  3 ++-
 2 files changed, 29 insertions(+), 1 deletion(-)

diff --git a/meta-oe/recipes-support/canonical-multitouch/frame/pessimizing-move.patch b/meta-oe/recipes-support/canonical-multitouch/frame/pessimizing-move.patch
new file mode 100644
index 0000000..aa5a56a
--- /dev/null
+++ b/meta-oe/recipes-support/canonical-multitouch/frame/pessimizing-move.patch
@@ -0,0 +1,27 @@
+let compiler decide on copy elision
+Fixes compiler errors with clang
+| ../../frame-2.5.0/src/x11/device_x11.cpp:126:13: error: moving a temporary object prevents copy elision [-Werror,-Wpessimizing-move]
+|             std::move(UniqueUFAxis(static_cast<oif::frame::UFAxis*>(axis)));
+|             ^
+| ../../frame-2.5.0/src/x11/device_x11.cpp:126:13: note: remove std::move call here
+|             std::move(UniqueUFAxis(static_cast<oif::frame::UFAxis*>(axis)));
+|             ^~~~~~~~~~                                                    ~
+| 1 error generated.
+
+Signed-off-by: Khem Raj <raj.khem at gmail.com>
+Upstream-Status: Pending
+
+Index: frame-2.5.0/src/x11/device_x11.cpp
+===================================================================
+--- frame-2.5.0.orig/src/x11/device_x11.cpp
++++ frame-2.5.0/src/x11/device_x11.cpp
+@@ -122,8 +122,7 @@ UFDeviceX11::UFDeviceX11(Display* displa
+         UFAxis_* axis = new UFAxis(type, valuator_info->min, valuator_info->max,
+                                    valuator_info->resolution);
+ 
+-        axes_[type] =
+-            std::move(UniqueUFAxis(static_cast<oif::frame::UFAxis*>(axis)));
++        axes_[type] = UniqueUFAxis(static_cast<oif::frame::UFAxis*>(axis));
+ 
+         axis_map_[valuator_info->number] = type;
+ 
diff --git a/meta-oe/recipes-support/canonical-multitouch/frame_2.5.0.bb b/meta-oe/recipes-support/canonical-multitouch/frame_2.5.0.bb
index ecc9524..0ad10a4 100644
--- a/meta-oe/recipes-support/canonical-multitouch/frame_2.5.0.bb
+++ b/meta-oe/recipes-support/canonical-multitouch/frame_2.5.0.bb
@@ -10,7 +10,8 @@ LIC_FILES_CHKSUM = " \
 
 inherit autotools pkgconfig
 
-SRC_URI = "https://launchpad.net/${BPN}/trunk/v${PV}/+download/${BPN}-${PV}.tar.gz"
+SRC_URI = "https://launchpad.net/${BPN}/trunk/v${PV}/+download/${BPN}-${PV}.tar.gz \
+           file://pessimizing-move.patch"
 SRC_URI[md5sum] = "02baa941091c5d198cd1623b3ad36e68"
 SRC_URI[sha256sum] = "cfb9ab52cdccd926f1822a457264d0014c7eb9f4600a72626063dd073b26256f"
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list