diff mbox series

[oe,meta-oe,3/5] opencv: Fix build with clang

Message ID 20170911151056.4577-3-raj.khem@gmail.com
State Accepted
Commit 4a45235796df0ca1b3bca5407b9615281cf8889d
Headers show
Series [oe,meta-initramfs,1/5] klibc: Edit out gcc hardcoding in do_compile | expand

Commit Message

Khem Raj Sept. 11, 2017, 3:10 p.m. UTC
-isystem is not needed even with clang

Signed-off-by: Khem Raj <raj.khem@gmail.com>

---
 .../opencv/opencv/0001-Dont-use-isystem.patch      | 26 ++++++++++++++++++++++
 meta-oe/recipes-support/opencv/opencv_3.3.bb       |  2 +-
 2 files changed, 27 insertions(+), 1 deletion(-)
 create mode 100644 meta-oe/recipes-support/opencv/opencv/0001-Dont-use-isystem.patch

-- 
2.14.1

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

Patch

diff --git a/meta-oe/recipes-support/opencv/opencv/0001-Dont-use-isystem.patch b/meta-oe/recipes-support/opencv/opencv/0001-Dont-use-isystem.patch
new file mode 100644
index 000000000..6dd48fcdc
--- /dev/null
+++ b/meta-oe/recipes-support/opencv/opencv/0001-Dont-use-isystem.patch
@@ -0,0 +1,26 @@ 
+From 2bc6bb9831d07f035fea74ea745cea43dd5f9ef9 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 9 Sep 2017 23:48:31 -0700
+Subject: [PATCH] Dont use isystem
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ cmake/OpenCVPCHSupport.cmake | 10 ++++------
+ 1 file changed, 4 insertions(+), 6 deletions(-)
+
+Index: git/cmake/OpenCVPCHSupport.cmake
+===================================================================
+--- git.orig/cmake/OpenCVPCHSupport.cmake
++++ git/cmake/OpenCVPCHSupport.cmake
+@@ -17,7 +17,8 @@ IF(CMAKE_COMPILER_IS_GNUCXX)
+     IF(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.2.0")
+         SET(PCHSupport_FOUND TRUE)
+     ENDIF()
+-
++    SET(CMAKE_INCLUDE_SYSTEM_FLAG_C "-I")
++    SET(CMAKE_INCLUDE_SYSTEM_FLAG_CXX "-I")
+     SET(_PCH_include_prefix "-I")
+     SET(_PCH_isystem_prefix "-isystem")
+     SET(_PCH_define_prefix "-D")
diff --git a/meta-oe/recipes-support/opencv/opencv_3.3.bb b/meta-oe/recipes-support/opencv/opencv_3.3.bb
index efbb2f52a..25f247662 100644
--- a/meta-oe/recipes-support/opencv/opencv_3.3.bb
+++ b/meta-oe/recipes-support/opencv/opencv_3.3.bb
@@ -49,8 +49,8 @@  SRC_URI = "git://github.com/opencv/opencv.git;name=opencv \
     file://0001-build-workaround-GCC-7.1.1-compilation-issue-with-sa.patch \
     file://0002-imgcodecs-refactoring-improve-code-quality.patch \
     file://0003-imgproc-test-add-checks-for-remove-call.patch \
+    file://0001-Dont-use-isystem.patch \
 "
-
 PV = "3.3+git${SRCPV}"
 
 S = "${WORKDIR}/git"