repair clang abi
This commit is contained in:
parent
a6c651608e
commit
ffb6ac309e
@ -15,7 +15,7 @@ diff -Npur opencv-4.5.2/modules/core/include/opencv2/core/types.hpp opencv-4.5.2
|
||||
Point_(const Size_<_Tp>& sz);
|
||||
Point_(const Vec<_Tp, 2>& v);
|
||||
|
||||
+#if (defined(__GNUC__) && __GNUC__ < 5) // GCC 4.x bug. Details: https://github.com/opencv/opencv/pull/20837
|
||||
+#if (defined(__GNUC__) && __GNUC__ < 5)
|
||||
+ Point_& operator = (const Point_& pt);
|
||||
+ Point_& operator = (Point_&& pt) CV_NOEXCEPT = default;
|
||||
+#elif OPENCV_ABI_COMPATIBILITY < 500
|
||||
|
||||
39
Repair_clang_abi.patch
Normal file
39
Repair_clang_abi.patch
Normal file
@ -0,0 +1,39 @@
|
||||
diff -Npur opencv-4.5.2/modules/core/include/opencv2/core/types.hpp opencv-4.5.2-new/modules/core/include/opencv2/core/types.hpp
|
||||
--- opencv-4.5.2/modules/core/include/opencv2/core/types.hpp 2021-11-17 10:30:22.631203192 +0800
|
||||
+++ opencv-4.5.2-new/modules/core/include/opencv2/core/types.hpp 2021-11-17 10:34:53.117761924 +0800
|
||||
@@ -162,7 +162,7 @@ public:
|
||||
//! default constructor
|
||||
Point_();
|
||||
Point_(_Tp _x, _Tp _y);
|
||||
-#if (defined(__GNUC__) && __GNUC__ < 5)
|
||||
+#if (defined(__GNUC__) && __GNUC__ < 5) && !defined(__clang__)
|
||||
Point_(const Point_& pt);
|
||||
Point_(Point_&& pt) CV_NOEXCEPT = default;
|
||||
#elif OPENCV_ABI_COMPATIBILITY < 500
|
||||
@@ -172,7 +172,7 @@ public:
|
||||
Point_(const Size_<_Tp>& sz);
|
||||
Point_(const Vec<_Tp, 2>& v);
|
||||
|
||||
-#if (defined(__GNUC__) && __GNUC__ < 5)
|
||||
+#if (defined(__GNUC__) && __GNUC__ < 5) && !defined(__clang__)
|
||||
Point_& operator = (const Point_& pt);
|
||||
Point_& operator = (Point_&& pt) CV_NOEXCEPT = default;
|
||||
#elif OPENCV_ABI_COMPATIBILITY < 500
|
||||
@@ -1186,7 +1186,7 @@ template<typename _Tp> inline
|
||||
Point_<_Tp>::Point_(_Tp _x, _Tp _y)
|
||||
: x(_x), y(_y) {}
|
||||
|
||||
-#if (defined(__GNUC__) && __GNUC__ < 5)
|
||||
+#if (defined(__GNUC__) && __GNUC__ < 5) && !defined(__clang__)
|
||||
template<typename _Tp> inline
|
||||
Point_<_Tp>::Point_(const Point_& pt)
|
||||
: x(pt.x), y(pt.y) {}
|
||||
@@ -1208,7 +1208,7 @@ template<typename _Tp> inline
|
||||
Point_<_Tp>::Point_(const Vec<_Tp,2>& v)
|
||||
: x(v[0]), y(v[1]) {}
|
||||
|
||||
-#if (defined(__GNUC__) && __GNUC__ < 5)
|
||||
+#if (defined(__GNUC__) && __GNUC__ < 5) && !defined(__clang__)
|
||||
template<typename _Tp> inline
|
||||
Point_<_Tp>& Point_<_Tp>::operator = (const Point_& pt)
|
||||
{
|
||||
@ -1,6 +1,6 @@
|
||||
Name: opencv
|
||||
Version: 4.5.2
|
||||
Release: 3
|
||||
Release: 4
|
||||
Summary: OpenCV means Intel® Open Source Computer Vision Library.
|
||||
License: Apache-2.0
|
||||
URL: https://github.com/opencv/opencv
|
||||
@ -13,6 +13,7 @@ Source5: opencv_extra-4.5.2.tar.gz.ad
|
||||
Source6: opencv_extra-4.5.2.tar.gz.ae
|
||||
Patch1: Fix-OpenCV-build-with-OpenEXR-before-2.2.0.patch
|
||||
Patch2: Fix_compilation_of_copy_assignment_operators_with_GCC.patch
|
||||
Patch3: Repair_clang_abi.patch
|
||||
BuildRequires: gcc-c++ gcc autoconf pkgconfig protobuf-compiler protobuf
|
||||
BuildRequires: cmake
|
||||
|
||||
@ -72,6 +73,9 @@ make install DESTDIR=%{buildroot}
|
||||
%exclude /usr/share/*
|
||||
|
||||
%changelog
|
||||
* Wed Nov 17 2021 shenwei <shenwei41@huawei.com> - 4.5.2-4
|
||||
- repair Clang ABI
|
||||
|
||||
* Sat Nov 13 2021 shenwei <shenwei41@huawei.com> - 4.5.2-3
|
||||
- fix compilation of copy ctors/assignment operators with GCC 4.x
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user