package/opencv3: fix build due to gcc bug 68485
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
@@ -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
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/c78eac84d1c5a6702e7759cd5364da1c3e399b4bSigned-off-by Fabrice Fontaine <[email protected]>
Quoted 23 lines
---
Changes v1 -> v2 (after review of Giulio Benetti):
- Improve commit logpackage/opencv3/opencv3.mk | 4 ++++ 1 file changed, 4 insertions(+)package/opencv3/opencv3.mk +4
-0@@ -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
Thomas Petazzoni
AppliedPATCH v2 1/1 package/opencv3: fix build due to gcc bug 68485
In reply to Fabrice FontaineQuoted 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/c78eac84d1c5a6702e7759cd5364da1c3e399b4bSigned-off-by Fabrice Fontaine <[email protected]>---
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