summaryrefslogtreecommitdiffstats
path: root/meta-oe
diff options
context:
space:
mode:
authorRicardo Ribalda Delgado <ricardo.ribalda@gmail.com>2016-08-05 18:38:47 +0200
committerMartin Jansa <Martin.Jansa@gmail.com>2016-08-15 12:31:57 +0200
commit886a5da6ac086cf0bf465609ee3b2f4fd177a007 (patch)
tree9d64e5c71577905a880ab2642341e7f2440422b9 /meta-oe
parent2e0332ce3c86bfae9c69a3d434767d5a31fa8053 (diff)
downloadmeta-openembedded-886a5da6ac086cf0bf465609ee3b2f4fd177a007.tar.gz
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@gmail.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe')
-rw-r--r--meta-oe/recipes-support/opencv/opencv/fixgcc60.patch30
-rw-r--r--meta-oe/recipes-support/opencv/opencv_3.1.bb4
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 0000000000..5d0bf97cab
--- /dev/null
+++ b/meta-oe/recipes-support/opencv/opencv/fixgcc60.patch
@@ -0,0 +1,30 @@
1diff --git a/cmake/OpenCVPCHSupport.cmake b/cmake/OpenCVPCHSupport.cmake
2index 28ccc1c6be4f..b0e1cbf77287 100644
3--- a/cmake/OpenCVPCHSupport.cmake
4+++ b/cmake/OpenCVPCHSupport.cmake
5@@ -19,7 +19,7 @@ IF(CMAKE_COMPILER_IS_GNUCXX)
6 ARGS ${CMAKE_CXX_COMPILER_ARG1} -dumpversion
7 OUTPUT_VARIABLE gcc_compiler_version)
8 #MESSAGE("GCC Version: ${gcc_compiler_version}")
9- IF(gcc_compiler_version VERSION_GREATER "4.2.-1")
10+ IF(gcc_compiler_version VERSION_GREATER "4.2.-1" AND gcc_compiler_version VERSION_LESS "6.0.0")
11 SET(PCHSupport_FOUND TRUE)
12 ENDIF()
13
14diff --git a/cmake/OpenCVUtils.cmake b/cmake/OpenCVUtils.cmake
15index 3a23cd73633d..1fea1578b1d9 100644
16--- a/cmake/OpenCVUtils.cmake
17+++ b/cmake/OpenCVUtils.cmake
18@@ -76,7 +76,11 @@ function(ocv_include_directories)
19 if("${__abs_dir}" MATCHES "^${OpenCV_SOURCE_DIR}" OR "${__abs_dir}" MATCHES "^${OpenCV_BINARY_DIR}")
20 list(APPEND __add_before "${dir}")
21 else()
22- include_directories(AFTER SYSTEM "${dir}")
23+ if (gcc_compiler_version VERSION_LESS "6.0.0")
24+ include_directories(AFTER SYSTEM "${dir}")
25+ else()
26+ include_directories(AFTER "${dir}")
27+ endif()
28 endif()
29 endforeach()
30 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 c41baec7bb..8ab9a2b4e0 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 \
22 git://github.com/Itseez/opencv_contrib.git;destsuffix=contrib;name=contrib \ 22 git://github.com/Itseez/opencv_contrib.git;destsuffix=contrib;name=contrib \
23 git://github.com/Itseez/opencv_3rdparty.git;branch=ippicv/master_20151201;destsuffix=party3;name=party3 \ 23 git://github.com/Itseez/opencv_3rdparty.git;branch=ippicv/master_20151201;destsuffix=party3;name=party3 \
24 file://0001-3rdparty-ippicv-Use-pre-downloaded-ipp.patch \ 24 file://0001-3rdparty-ippicv-Use-pre-downloaded-ipp.patch \
25 file://fixgcc60.patch \
25 file://fixpkgconfig.patch" 26 file://fixpkgconfig.patch"
26 27
27PV = "3.1+git${SRCPV}" 28PV = "3.1+git${SRCPV}"
@@ -145,6 +146,3 @@ do_install_append() {
145 install -d ${D}${datadir}/OpenCV/samples/bin/ 146 install -d ${D}${datadir}/OpenCV/samples/bin/
146 cp -f bin/*-tutorial-* bin/*-example-* ${D}${datadir}/OpenCV/samples/bin/ 147 cp -f bin/*-tutorial-* bin/*-example-* ${D}${datadir}/OpenCV/samples/bin/
147} 148}
148
149# http://errors.yoctoproject.org/Errors/Details/68617/
150PNBLACKLIST[opencv] ?= "BROKEN: fails to build with gcc-6"