mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-08-02 16:07:42 +00:00
package/opencv: fix build due to gcc bug 68485
With Microblaze Gcc version <= 9.x the build fails due to gcc bug 68485: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68485. The bug show up when building opencv with optimization but not when building with -O0. To work around this, if BR2_TOOLCHAIN_HAS_GCC_BUG_68458=y, we force using -O0. Fixes: - http://autobuild.buildroot.org/results/17fff0f312ebd520ba3341976ba56fd8c85ee376 Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> Reviewed-by: Giulio Benetti <giulio.benetti@micronovasrl.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
parent
ff74bb88fd
commit
5d05e82135
@ -10,6 +10,7 @@ OPENCV_INSTALL_STAGING = YES
|
|||||||
OPENCV_LICENSE = BSD-3-Clause
|
OPENCV_LICENSE = BSD-3-Clause
|
||||||
OPENCV_LICENSE_FILES = LICENSE
|
OPENCV_LICENSE_FILES = LICENSE
|
||||||
OPENCV_SUPPORTS_IN_SOURCE_BUILD = NO
|
OPENCV_SUPPORTS_IN_SOURCE_BUILD = NO
|
||||||
|
OPENCV_CXXFLAGS = $(TARGET_CXXFLAGS)
|
||||||
|
|
||||||
# OpenCV component options
|
# OpenCV component options
|
||||||
OPENCV_CONF_OPTS += \
|
OPENCV_CONF_OPTS += \
|
||||||
@ -166,6 +167,10 @@ OPENCV_CONF_OPTS += \
|
|||||||
|
|
||||||
OPENCV_DEPENDENCIES += zlib
|
OPENCV_DEPENDENCIES += zlib
|
||||||
|
|
||||||
|
ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_68485),y)
|
||||||
|
OPENCV_CXXFLAGS += -O0
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(BR2_PACKAGE_OPENCV_WITH_FFMPEG),y)
|
ifeq ($(BR2_PACKAGE_OPENCV_WITH_FFMPEG),y)
|
||||||
OPENCV_CONF_OPTS += -DWITH_FFMPEG=ON
|
OPENCV_CONF_OPTS += -DWITH_FFMPEG=ON
|
||||||
OPENCV_DEPENDENCIES += ffmpeg bzip2
|
OPENCV_DEPENDENCIES += ffmpeg bzip2
|
||||||
@ -195,8 +200,8 @@ OPENCV_CONF_OPTS += -DWITH_GTK=OFF
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(BR2_PACKAGE_OPENCV_WITH_JASPER),y)
|
ifeq ($(BR2_PACKAGE_OPENCV_WITH_JASPER),y)
|
||||||
OPENCV_CONF_OPTS += -DWITH_JASPER=ON \
|
OPENCV_CONF_OPTS += -DWITH_JASPER=ON
|
||||||
-DCMAKE_CXX_FLAGS="$(TARGET_CXXFLAGS) -D__STDC_LIMIT_MACROS"
|
OPENCV_CXXFLAGS += -D__STDC_LIMIT_MACROS
|
||||||
OPENCV_DEPENDENCIES += jasper
|
OPENCV_DEPENDENCIES += jasper
|
||||||
else
|
else
|
||||||
OPENCV_CONF_OPTS += -DWITH_JASPER=OFF
|
OPENCV_CONF_OPTS += -DWITH_JASPER=OFF
|
||||||
@ -232,6 +237,8 @@ else
|
|||||||
OPENCV_CONF_OPTS += -DWITH_V4L=OFF -DWITH_LIBV4L=OFF
|
OPENCV_CONF_OPTS += -DWITH_V4L=OFF -DWITH_LIBV4L=OFF
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
OPENCV_CONF_OPTS += -DCMAKE_CXX_FLAGS="$(OPENCV_CXXFLAGS)"
|
||||||
|
|
||||||
# Installation hooks:
|
# Installation hooks:
|
||||||
define OPENCV_CLEAN_INSTALL_DOC
|
define OPENCV_CLEAN_INSTALL_DOC
|
||||||
$(RM) -fr $(TARGET_DIR)/usr/share/OpenCV/doc
|
$(RM) -fr $(TARGET_DIR)/usr/share/OpenCV/doc
|
||||||
|
Loading…
x
Reference in New Issue
Block a user