[oe-commits] [meta-openembedded] 04/36: opencv: Fix build with gcc 6.0
git at git.openembedded.org
git at git.openembedded.org
Wed Aug 10 11:48:59 UTC 2016
martin_jansa pushed a commit to branch master-next
in repository meta-openembedded.
commit 82a5be61a058d1f0de7787c7d7db77fd9542051a
Author: Ricardo Ribalda Delgado <ricardo.ribalda at gmail.com>
AuthorDate: Fri Aug 5 18:38:47 2016 +0200
opencv: Fix build with gcc 6.0
It seems like gcc 6.0 does not have the same behaviour as previous 5.x
with regards isystem flag.
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda at gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>
---
.../recipes-support/opencv/opencv/fixgcc60.patch | 30 ++++++++++++++++++++++
meta-oe/recipes-support/opencv/opencv_3.1.bb | 4 +--
2 files changed, 31 insertions(+), 3 deletions(-)
diff --git a/meta-oe/recipes-support/opencv/opencv/fixgcc60.patch b/meta-oe/recipes-support/opencv/opencv/fixgcc60.patch
new file mode 100644
index 0000000..5d0bf97
--- /dev/null
+++ b/meta-oe/recipes-support/opencv/opencv/fixgcc60.patch
@@ -0,0 +1,30 @@
+diff --git a/cmake/OpenCVPCHSupport.cmake b/cmake/OpenCVPCHSupport.cmake
+index 28ccc1c6be4f..b0e1cbf77287 100644
+--- a/cmake/OpenCVPCHSupport.cmake
++++ b/cmake/OpenCVPCHSupport.cmake
+@@ -19,7 +19,7 @@ IF(CMAKE_COMPILER_IS_GNUCXX)
+ ARGS ${CMAKE_CXX_COMPILER_ARG1} -dumpversion
+ OUTPUT_VARIABLE gcc_compiler_version)
+ #MESSAGE("GCC Version: ${gcc_compiler_version}")
+- IF(gcc_compiler_version VERSION_GREATER "4.2.-1")
++ IF(gcc_compiler_version VERSION_GREATER "4.2.-1" AND gcc_compiler_version VERSION_LESS "6.0.0")
+ SET(PCHSupport_FOUND TRUE)
+ ENDIF()
+
+diff --git a/cmake/OpenCVUtils.cmake b/cmake/OpenCVUtils.cmake
+index 3a23cd73633d..1fea1578b1d9 100644
+--- a/cmake/OpenCVUtils.cmake
++++ b/cmake/OpenCVUtils.cmake
+@@ -76,7 +76,11 @@ function(ocv_include_directories)
+ if("${__abs_dir}" MATCHES "^${OpenCV_SOURCE_DIR}" OR "${__abs_dir}" MATCHES "^${OpenCV_BINARY_DIR}")
+ list(APPEND __add_before "${dir}")
+ else()
+- include_directories(AFTER SYSTEM "${dir}")
++ if (gcc_compiler_version VERSION_LESS "6.0.0")
++ include_directories(AFTER SYSTEM "${dir}")
++ else()
++ include_directories(AFTER "${dir}")
++ endif()
+ endif()
+ endforeach()
+ include_directories(BEFORE ${__add_before})
diff --git a/meta-oe/recipes-support/opencv/opencv_3.1.bb b/meta-oe/recipes-support/opencv/opencv_3.1.bb
index c41baec..8ab9a2b 100644
--- a/meta-oe/recipes-support/opencv/opencv_3.1.bb
+++ b/meta-oe/recipes-support/opencv/opencv_3.1.bb
@@ -22,6 +22,7 @@ SRC_URI = "git://github.com/Itseez/opencv.git;name=opencv \
git://github.com/Itseez/opencv_contrib.git;destsuffix=contrib;name=contrib \
git://github.com/Itseez/opencv_3rdparty.git;branch=ippicv/master_20151201;destsuffix=party3;name=party3 \
file://0001-3rdparty-ippicv-Use-pre-downloaded-ipp.patch \
+ file://fixgcc60.patch \
file://fixpkgconfig.patch"
PV = "3.1+git${SRCPV}"
@@ -145,6 +146,3 @@ do_install_append() {
install -d ${D}${datadir}/OpenCV/samples/bin/
cp -f bin/*-tutorial-* bin/*-example-* ${D}${datadir}/OpenCV/samples/bin/
}
-
-# http://errors.yoctoproject.org/Errors/Details/68617/
-PNBLACKLIST[opencv] ?= "BROKEN: fails to build with gcc-6"
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list