mingw-opencv/opencv_bigobj.patch
2024-07-28 11:35:22 +02:00

16 lines
693 B
Diff

diff -rupN --no-dereference opencv-4.10.0/modules/python/common.cmake opencv-4.10.0-new/modules/python/common.cmake
--- opencv-4.10.0/modules/python/common.cmake 2024-06-02 13:41:07.000000000 +0200
+++ opencv-4.10.0-new/modules/python/common.cmake 2024-07-27 10:32:08.604920913 +0200
@@ -19,6 +19,11 @@ if(NOT WIN32 AND NOT APPLE AND NOT OPENC
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--exclude-libs=ALL")
endif()
+# Pass -Wa,-mbig-obj to linker
+if(MINGW)
+ set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wa,-mbig-obj")
+endif()
+
ocv_add_library(${the_module} MODULE
${PYTHON_SOURCE_DIR}/src2/cv2.cpp
${PYTHON_SOURCE_DIR}/src2/cv2_util.cpp