aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Fabrice Fontaine <fontaine.fabrice@gmail.com>2019-05-31 18:26:45 +0200
committerGravatar Thomas Petazzoni <thomas.petazzoni@bootlin.com>2019-05-31 22:21:37 +0200
commit87040137a38012e9ae680098fc5facda0ea0fcf3 (patch)
tree445a32bd111781a74d5cd3082fc45cbe75f7732a
parent4cc31dfa3de505dd138d3d37ac80f7c0428fc1ab (diff)
downloadbuildroot-87040137a38012e9ae680098fc5facda0ea0fcf3.tar.gz
buildroot-87040137a38012e9ae680098fc5facda0ea0fcf3.tar.bz2
package/opencv3: 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 opencv3 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/c78eac84d1c5a6702e7759cd5364da1c3e399b4b 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>
-rw-r--r--package/opencv3/opencv3.mk4
1 files changed, 4 insertions, 0 deletions
diff --git a/package/opencv3/opencv3.mk b/package/opencv3/opencv3.mk
index 292ce81432..49b29d9f1e 100644
--- a/package/opencv3/opencv3.mk
+++ b/package/opencv3/opencv3.mk
@@ -23,6 +23,10 @@ ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_64735),y)
OPENCV3_CXXFLAGS += -DCV__EXCEPTION_PTR=0
endif
+ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_68485),y)
+OPENCV3_CXXFLAGS += -O0
+endif
+
# OpenCV component options
OPENCV3_CONF_OPTS += \
-DCMAKE_CXX_FLAGS="$(OPENCV3_CXXFLAGS)" \