- pass cmake options to disable -O3 overrides and -msse/-msse2 on CPUs which possibly don't support SSE
Changed files:
opencv-cflags.patch -> 1.2
opencv.spec -> 1.22
if(MSVC)
set(EXTRA_C_FLAGS "${EXTRA_C_FLAGS} /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS")
# 64-bit portability warnings, in MSVC8
+@@ -916,16 +918,6 @@
+ set(EXTRA_C_FLAGS "${EXTRA_C_FLAGS} -Werror")
+ endif()
+
+- if(X86)
+- if(NOT MINGW64)
+- if(NOT X86_64)
+- if(NOT APPLE)
+- set(EXTRA_C_FLAGS "${EXTRA_C_FLAGS} -march=i686")
+- endif()
+- endif()
+- endif()
+- endif()
+-
+ # Other optimizations
+ if(USE_OMIT_FRAME_POINTER)
+ set(EXTRA_C_FLAGS_RELEASE "${EXTRA_C_FLAGS_RELEASE} -fomit-frame-pointer")
install -d build
cd build
%cmake .. \
-%ifarch i686 pentium4 athlon %{x8664}
+ -DCMAKE_C_FLAGS_RELEASE="-DNDEBUG" \
+ -DCMAKE_CXX_FLAGS_RELEASE="-DNDEBUG" \
+%ifarch pentium4 %{x8664}
+ -DENABLE_SSE=ON \
-DENABLE_SSE2=ON \
+%else
+ -DENABLE_SSE=OFF \
+ -DENABLE_SSE2=OFF \
%endif
-DBUILD_NEW_PYTHON_SUPPORT=ON \
-%if %{with xine}
- -DWITH_XINE=ON \
-%endif
- -DWITH_GSTREAMER=OFF \
+ -DUSE_O3=OFF \
-DWITH_1394=ON \
-DWITH_FFMPEG=ON \
+ -DWITH_GSTREAMER=OFF \
-DWITH_GTK=ON \
- -DWITH_V4L=ON
+ -DWITH_V4L=ON \
+%if %{with xine}
+ -DWITH_XINE=ON
+%endif
-%{__make} \
- VERBOSE=1
+%{__make}
%install
rm -rf $RPM_BUILD_ROOT