Skip to contentSkip to conversation

package/opencv3: fix build due to gcc bug 68485

PATCH New Fabrice Fontaine 3 participants 3 messages May 31, 2019

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 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

---
Changes v1 -> v2 (after review of Giulio Benetti):
- Improve commit log

 package/opencv3/opencv3.mk | 4 ++++
 1 file changed, 4 insertions(+)
package/opencv3/opencv3.mk +4 -0
index 292ce81432..49b29d9f1e 100644
@@ -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)" \
Signature · 1 line
2.20.1
#1 lore raw

PATCH v2 1/1 package/opencv3: fix build due to gcc bug 68485

Thank you!

Il 31/05/2019 18:26, Fabrice Fontaine ha scritto:

Quoted 10 lines

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

Quoted 23 lines

---
Changes v1 -> v2 (after review of Giulio Benetti):
- Improve commit log

  package/opencv3/opencv3.mk | 4 ++++
  1 file changed, 4 insertions(+)
package/opencv3/opencv3.mk +4 -0
index 292ce81432..49b29d9f1e 100644
@@ -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)" \
Signature · 10 lines
Giulio Benetti
CTO

MICRONOVA SRL
Sede: Via A. Niedda 3 - 35010 Vigonza (PD)
Tel. 049/8931563 - Fax 049/8931346
Cod.Fiscale - P.IVA 02663420285
Capitale Sociale ? 26.000 i.v.
Iscritta al Reg. Imprese di Padova N. 02663420285
Numero R.E.A. 258642
#2 lore raw

PATCH v2 1/1 package/opencv3: fix build due to gcc bug 68485

In reply to Fabrice Fontaine
Quoted 6 lines · On Fri, 31 May 2019 18:26:45 +0200 Fabrice Fontaine…

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.

Quoted 7 lines

Fixes:
- http://autobuild.buildroot.org/results/c78eac84d1c5a6702e7759cd5364da1c3e399b4b

---
Changes v1 -> v2 (after review of Giulio Benetti):
- Improve commit log

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com