Accepting request 400535 from KDE:Extra

Fixes ppc64le nuild with gcc6 (forwarded request 400460 from dimstar)

OBS-URL: https://build.opensuse.org/request/show/400535
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/opencv?expand=0&rev=63
This commit is contained in:
Dominique Leuenberger 2016-06-14 21:05:35 +00:00 committed by Git OBS Bridge
parent d4b1601df7
commit 60f07432b1
5 changed files with 70 additions and 2 deletions

View File

@ -0,0 +1,26 @@
From a0fdc91a14f07de25d858037940fcd3ba859b4e2 Mon Sep 17 00:00:00 2001
From: Maksim Shabunin <maksim.shabunin@itseez.com>
Date: Fri, 13 May 2016 13:28:09 +0300
Subject: [PATCH] Disabled PCH support for gcc >= 6.0.0
Command line generation routine uses "-isystem" to include headers outside of "<opencv>/modules" folder, but GCC 6 does not work when passed "-isystem /usr/include" option.
---
cmake/OpenCVPCHSupport.cmake | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cmake/OpenCVPCHSupport.cmake b/cmake/OpenCVPCHSupport.cmake
index 243fb4c..a2df014 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()
--
2.8.2

View File

@ -1,3 +1,16 @@
-------------------------------------------------------------------
Tue Jun 7 08:53:04 UTC 2016 - dimstar@opensuse.org
- In case we build using GCC6 (or newer), add -mlra to CFLAGS to
workaround gcc bug
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71294.
-------------------------------------------------------------------
Wed May 25 13:38:26 UTC 2016 - martin.liska@suse.com
- Apply upstream patch opencv-gcc6-disable-pch.patch to disable
PCH for GCC6.
-------------------------------------------------------------------
Mon Mar 21 17:05:19 UTC 2016 - toddrme2178@gmail.com

View File

@ -39,6 +39,8 @@ Patch6: opencv-gcc5.patch
Patch7: opencv-gles.patch
# PATCH-FIX-OPENSUSE opencv-build-compare.patch -- avoid republish if some random external version number changes
Patch8: opencv-build-compare.patch
# PATCH-FIX-OPENSUSE opencv-gcc6-disable-pch.patch -- Disable PCH for GCC6.
Patch9: opencv-gcc6-disable-pch.patch
BuildRequires: cmake
BuildRequires: fdupes
BuildRequires: unzip
@ -161,13 +163,19 @@ This package contains the documentation and examples for the OpenCV library.
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
# Remove Windows specific files
rm -f doc/packaging.txt
%build
%ifarch ppc64le
if [ $(gcc -dumpversion) -ge 6 ]; then
export mlra=-mlra
fi
%endif
export CFLAGS="%{optflags} $(getconf LFS_CFLAGS)"
export CXXFLAGS="%{optflags} $(getconf LFS_CFLAGS)"
export CXXFLAGS="%{optflags} ${mlra} $(getconf LFS_CFLAGS)"
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release \

View File

@ -1,3 +1,16 @@
-------------------------------------------------------------------
Tue Jun 7 08:53:04 UTC 2016 - dimstar@opensuse.org
- In case we build using GCC6 (or newer), add -mlra to CFLAGS to
workaround gcc bug
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71294.
-------------------------------------------------------------------
Wed May 25 13:38:26 UTC 2016 - martin.liska@suse.com
- Apply upstream patch opencv-gcc6-disable-pch.patch to disable
PCH for GCC6.
-------------------------------------------------------------------
Mon Mar 21 17:05:19 UTC 2016 - toddrme2178@gmail.com

View File

@ -35,6 +35,8 @@ Source1: opencv_contrib_face-3.1.0.tar.bz2
Patch6: opencv-gcc5.patch
# PATCH-FIX-OPENSUSE opencv-build-compare.patch -- avoid republish if some random external version number changes
Patch8: opencv-build-compare.patch
# PATCH-FIX-OPENSUSE opencv-gcc6-disable-pch.patch -- Disable PCH for GCC6.
Patch9: opencv-gcc6-disable-pch.patch
BuildRequires: cmake
BuildRequires: fdupes
BuildRequires: unzip
@ -146,6 +148,7 @@ This package contains the documentation and examples for the OpenCV library.
%setup -q -a 1
%patch6 -p1
%patch8 -p1
%patch9 -p1
# Remove Windows specific files
rm -f doc/packaging.txt
@ -153,8 +156,13 @@ rm -f doc/packaging.txt
# sed -i 's/\r$//' samples/c/facedetect.cmd
%build
%ifarch ppc64le
if [ $(gcc -dumpversion) -ge 6 ]; then
export mlra=-mlra
fi
%endif
export CFLAGS="%{optflags} $(getconf LFS_CFLAGS)"
export CXXFLAGS="%{optflags} $(getconf LFS_CFLAGS)"
export CXXFLAGS="%{optflags} ${mlra} $(getconf LFS_CFLAGS)"
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release \