Skip to contentSkip to conversation

Fix GCC BUG 85180 per-package

PATCH New Giulio Benetti 4 participants 44 messages May 21, 2019 – Jun 6, 2019

lore
Share & tools
lore
#0 lore raw

v2 cover Fix GCC BUG 85180 per-package

This patchset aims to build packages when building with Gcc affected by Bug 85180 instead of not bulding them at all.
Bug 85180:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85180
is present in Gcc version < 8.x
The basic solution is to force compiling without optimization, so forcing -O0 appending it to CFLAGS or CXXFLAGS according to programming language used in package.

Giulio Benetti (12):
toolchain: specify GCC_BUG_85180 is true only if GCC version < 8.x package/atop: fix BUG_85180 build timeout package/chocolate-doom: fix BUG_85180 build timeout package/ddrescue: fix BUG_85180 build timeout package/flare-engine: fix BUG_85180 build timeout package/glibmm: fix BUG_85180 build timeout package/gst-ffmpeg: re-enable package if BUG_85180 is present package/jasper: fix BUG_85180 build timeout package/kismet: fix BUG_85180 build timeout package/libcpprestsdk: fix BUG_85180 build timeout package/opus: fix BUG_85180 build timeout package/postgresql: fix BUG_85180 build timeout

 package/atop/atop.mk                       | 7 ++++++-
 package/chocolate-doom/chocolate-doom.mk   | 4 ++++
 package/ddrescue/ddrescue.mk               | 6 +++++-
 package/flare-engine/Config.in             | 4 ----
 package/flare-engine/flare-engine.mk       | 6 ++++++
 package/glibmm/glibmm.mk                   | 4 ++++
 package/gstreamer/gst-ffmpeg/Config.in     | 4 ----
 package/gstreamer/gst-ffmpeg/gst-ffmpeg.mk | 5 +++++
 package/jasper/jasper.mk                   | 4 ++++
 package/kismet/kismet.mk                   | 4 ++++
 package/libcpprestsdk/libcpprestsdk.mk     | 4 ++++
 package/opus/opus.mk                       | 4 ++++
 package/postgresql/postgresql.mk           | 4 ++++
 toolchain/Config.in                        | 1 +
 14 files changed, 51 insertions(+), 10 deletions(-)
Signature · 1 line
2.17.1
#1 lore raw

PATCH v2 1/12 toolchain: specify GCC_BUG_85180 is true only if GCC version < 8.x

Bug 85180:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85180
has been fixed on Gcc version >= 8.x

So:
- add 'depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_8' to 'config BR2_TOOLCHAIN_HAS_GCC_BUG_85180'.

---
 toolchain/Config.in | 1 +
 1 file changed, 1 insertion(+)
toolchain/Config.in +1 -0
index 467d6bd84f..d05ad88af4 100644
@@ -129,6 +129,7 @@ config BR2_TOOLCHAIN_HAS_GCC_BUG_64735
 config BR2_TOOLCHAIN_HAS_GCC_BUG_85180
 	bool
 	default y if BR2_microblaze
+	depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_8
 
 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85862
 # An infinite loop exists in the find_base_term() logic of 6.x
Signature · 1 line
2.17.1
#2 lore raw

PATCH v2 1/12 toolchain: specify GCC_BUG_85180 is true only if GCC version < 8.x

Quoted 8 lines · On Tue, 21 May 2019 15:39:21 +0200 Giulio Benetti…

Bug 85180:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85180
has been fixed on Gcc version >= 8.x

So:
- add 'depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_8' to 'config BR2_TOOLCHAIN_HAS_GCC_BUG_85180'.

Quoted 5 lines
---
 toolchain/Config.in | 1 +
 1 file changed, 1 insertion(+)

Applied to master with a tweaked commit log/title. Thanks!

Thomas

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

PATCH v2 1/12 toolchain: specify GCC_BUG_85180 is true only if GCC version < 8.x

Hello,

Il 22/05/2019 22:52, Thomas Petazzoni ha scritto:

Quoted 11 lines
Quoted 8 lines · On Tue, 21 May 2019 15:39:21 +0200 Giulio Benetti…

Bug 85180:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85180
has been fixed on Gcc version >= 8.x

So:
- add 'depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_8' to 'config BR2_TOOLCHAIN_HAS_GCC_BUG_85180'.

Quoted 7 lines
Quoted 5 lines
---
  toolchain/Config.in | 1 +
  1 file changed, 1 insertion(+)

Applied to master with a tweaked commit log/title. Thanks!

Thank you for rewording. Need to improve commit logs in general...

Kind regards

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
Quoted 2 lines

Thomas

#4 lore raw

PATCH v2 1/12 toolchain: specify GCC_BUG_85180 is true only if GCC version < 8.x

In reply to Giulio Benetti
Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Giulio" == Giulio Benetti <[email protected]> writes:

Bug 85180:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85180
has been fixed on Gcc version >= 8.x

Quoted 6 lines

So:
- add 'depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_8' to 'config BR2_TOOLCHAIN_HAS_GCC_BUG_85180'.

Committed to 2019.02.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#5 lore raw

PATCH v2 2/12 package/atop: fix BUG_85180 build timeout

In reply to Giulio Benetti

With Microblaze Gcc version < 8.x build hangs on compiling last files before linking. This is due to bug 85180:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85180
Bug shows up building atop with optimization but not when building with -O0.

If BR2_TOOLCHAIN_HAS_GCC_BUG_85180=y force using -O0 passing it to CFLAGS.

Fixes:
http://autobuild.buildroot.net/results/94a/94aa00f776b8a3491ac0b3212c95f5e666c5a29a/

---
V1 -> V2:
* use -O0 instead of -g1

 package/atop/atop.mk | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
package/atop/atop.mk +6 -1
index aaf02908c4..afce71f6cb 100644
@@ -10,8 +10,13 @@ ATOP_LICENSE = GPL-2.0+
 ATOP_LICENSE_FILES = COPYING
 ATOP_DEPENDENCIES = ncurses zlib
 
+ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180),y)
+ATOP_CFLAGS += $(TARGET_CFLAGS) -O0
+endif
+
 define ATOP_BUILD_CMDS
-	$(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D)
+	$(MAKE) $(TARGET_CONFIGURE_OPTS) CFLAGS="$(ATOP_CFLAGS)" \
+	-C $(@D)
 endef
 
 define ATOP_INSTALL_TARGET_CMDS
Signature · 1 line
2.17.1
#6 lore raw

PATCH v2 2/12 package/atop: fix BUG_85180 build timeout

Hello Giulio,

Quoted 6 lines · On Tue, 21 May 2019 15:39:22 +0200 Giulio Benetti…

With Microblaze Gcc version < 8.x build hangs on compiling last files before linking. This is due to bug 85180:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85180
Bug shows up building atop with optimization but not when building with -O0.

Quoted 7 lines

If BR2_TOOLCHAIN_HAS_GCC_BUG_85180=y force using -O0 passing it to CFLAGS.

Fixes:
http://autobuild.buildroot.net/results/94a/94aa00f776b8a3491ac0b3212c95f5e666c5a29a/

I have applied to master after reworking the commit title and commit log, and also adjusting the code a bit (see below).

package/atop/atop.mk ATOP_LICENSE = GPL-2.0+ · line 15

Quoted 11 lines
package/atop/atop.mk +3 -0
index aaf02908c4..afce71f6cb 100644
@@ -10,8 +10,13 @@ ATOP_LICENSE = GPL-2.0+
 ATOP_LICENSE_FILES = COPYING
 ATOP_DEPENDENCIES = ncurses zlib
 
+ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180),y)
+ATOP_CFLAGS += $(TARGET_CFLAGS) -O0
+endif

I believe:

ATOP_CFLAGS = $(TARGET_CFLAGS)

ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180),y)
ATOP_CFLAGS += -O0
endif

is more correct, otherwise you pass an empty CFLAGS when BR2_TOOLCHAIN_HAS_GCC_BUG_85180 is false.

package/atop/atop.mk ATOP_LICENSE = GPL-2.0+ · line 19

Quoted 5 lines
package/atop/atop.mk +3 -1
+
 define ATOP_BUILD_CMDS
-	$(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D)
+	$(MAKE) $(TARGET_CONFIGURE_OPTS) CFLAGS="$(ATOP_CFLAGS)" \
+	-C $(@D)

The second line is typically indented with one more tab.

As I said, I've applied to master after fixing those issues.

Thanks!

Thomas

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

PATCH v2 2/12 package/atop: fix BUG_85180 build timeout

Hello,

Il 22/05/2019 23:07, Thomas Petazzoni ha scritto:

Quoted 14 lines

Hello Giulio,

Quoted 9 lines · On Tue, 21 May 2019 15:39:22 +0200 Giulio Benetti…

With Microblaze Gcc version < 8.x build hangs on compiling last files before linking. This is due to bug 85180:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85180
Bug shows up building atop with optimization but not when building with -O0.

If BR2_TOOLCHAIN_HAS_GCC_BUG_85180=y force using -O0 passing it to CFLAGS.

Quoted 7 lines
Quoted 4 lines

Fixes:
http://autobuild.buildroot.net/results/94a/94aa00f776b8a3491ac0b3212c95f5e666c5a29a/

I have applied to master after reworking the commit title and commit log,

Again... Need to improve commit logs.

Quoted 16 lines

and also adjusting the code a bit (see below).

package/atop/atop.mk ATOP_LICENSE = GPL-2.0+ · line 15

Quoted 11 lines
package/atop/atop.mk +3 -0
index aaf02908c4..afce71f6cb 100644
@@ -10,8 +10,13 @@ ATOP_LICENSE = GPL-2.0+
  ATOP_LICENSE_FILES = COPYING
  ATOP_DEPENDENCIES = ncurses zlib
 
+ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180),y)
+ATOP_CFLAGS += $(TARGET_CFLAGS) -O0
+endif

I believe:

Quoted 8 lines

ATOP_CFLAGS = $(TARGET_CFLAGS)

ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180),y)
ATOP_CFLAGS += -O0
endif

is more correct, otherwise you pass an empty CFLAGS when BR2_TOOLCHAIN_HAS_GCC_BUG_85180 is false.

Yes totally right. Then I need to modify other patches for $(generic-package) packages as well as their commit logs at this point.

Quoted 8 lines

package/atop/atop.mk ATOP_LICENSE = GPL-2.0+ · line 19

Quoted 6 lines
package/atop/atop.mk +3 -1
+
  define ATOP_BUILD_CMDS
-	$(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D)
+	$(MAKE) $(TARGET_CONFIGURE_OPTS) CFLAGS="$(ATOP_CFLAGS)" \
+	-C $(@D)

The second line is typically indented with one more tab.

Ok. I've never noticed it. Thanks for pointing.

Best regards!

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
Quoted 6 lines

As I said, I've applied to master after fixing those issues.

Thanks!

Thomas

#8 lore raw

PATCH v2 2/12 package/atop: fix BUG_85180 build timeout

In reply to Giulio Benetti
Quoted 11 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Giulio" == Giulio Benetti <[email protected]> writes:

With Microblaze Gcc version < 8.x build hangs on compiling last files before linking. This is due to bug 85180:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85180
Bug shows up building atop with optimization but not when building with -O0.

If BR2_TOOLCHAIN_HAS_GCC_BUG_85180=y force using -O0 passing it to CFLAGS.

Quoted 7 lines

Fixes:
http://autobuild.buildroot.net/results/94a/94aa00f776b8a3491ac0b3212c95f5e666c5a29a/

---
V1 -> V2:
* use -O0 instead of -g1

Committed to 2019.02.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#9 lore raw

PATCH v2 3/12 package/chocolate-doom: fix BUG_85180 build timeout

In reply to Giulio Benetti

With Microblaze Gcc version < 8.x build hangs on compiling last files before linking.
This is due to bug 85180:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85180
Bug shows up building chocolate-doom with optimization but not when building with -O0.

If BR2_TOOLCHAIN_HAS_GCC_BUG_85180=y force using -O0 passing it to CFLAGS.

Fixes:
http://autobuild.buildroot.net/results/e57/e570839576be8963dc6bd36342e2f857da3c6146/

---
 package/chocolate-doom/chocolate-doom.mk | 4 ++++
 1 file changed, 4 insertions(+)
package/chocolate-doom/chocolate-doom.mk +4 -0
index 54121c43aa..5f2c28cdd9 100644
@@ -21,6 +21,10 @@ CHOCOLATE_DOOM_CONF_OPTS = \
 	--with-sdl-prefix=$(STAGING_DIR)/usr \
 	--with-sdl-exec-prefix=$(STAGING_DIR)/usr
 
+ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180),y)
+CHOCOLATE_DOOM_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -O0"
+endif
+
 ifeq ($(BR2_PACKAGE_LIBPNG),y)
 CHOCOLATE_DOOM_DEPENDENCIES += libpng
 CHOCOLATE_DOOM_CONF_OPTS += --with-libpng
Signature · 1 line
2.17.1
#10 lore raw

PATCH v2 3/12 package/chocolate-doom: fix BUG_85180 build timeout

Quoted 10 lines · On Tue, 21 May 2019 15:39:23 +0200 Giulio Benetti…

With Microblaze Gcc version < 8.x build hangs on compiling last files before linking.
This is due to bug 85180:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85180
Bug shows up building chocolate-doom with optimization but not when building with -O0.

If BR2_TOOLCHAIN_HAS_GCC_BUG_85180=y force using -O0 passing it to CFLAGS.

Quoted 7 lines

Fixes:
http://autobuild.buildroot.net/results/e57/e570839576be8963dc6bd36342e2f857da3c6146/

---
 package/chocolate-doom/chocolate-doom.mk | 4 ++++
 1 file changed, 4 insertions(+)

Applied to master after tweaking the CFLAGS logic and the commit log. Thanks!

Thomas

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

PATCH v2 3/12 package/chocolate-doom: fix BUG_85180 build timeout

In reply to Giulio Benetti
Quoted 9 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Giulio" == Giulio Benetti <[email protected]> writes:

With Microblaze Gcc version < 8.x build hangs on compiling last files before linking.
This is due to bug 85180:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85180
Bug shows up building chocolate-doom with optimization but not when building with -O0.

Quoted 7 lines

If BR2_TOOLCHAIN_HAS_GCC_BUG_85180=y force using -O0 passing it to CFLAGS.

Fixes:
http://autobuild.buildroot.net/results/e57/e570839576be8963dc6bd36342e2f857da3c6146/

Committed to 2019.02.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#12 lore raw

PATCH v2 4/12 package/ddrescue: fix BUG_85180 build timeout

In reply to Giulio Benetti

With Microblaze Gcc version < 8.x build hangs on compiling first files. This is due to bug 85180:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85180
Bug shows up building ddrescue with optimization but not when building with -O0.

If BR2_TOOLCHAIN_HAS_GCC_BUG_85180=y force using -O0 passing it to CXXFLAGS.

Fixes:
http://autobuild.buildroot.net/results/2af/2af69401acb76be3d3fd427d1c58fed3af33bf9b/

---
 package/ddrescue/ddrescue.mk | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
package/ddrescue/ddrescue.mk +5 -1
index 9432e7a16d..b746e4a416 100644
@@ -18,8 +18,12 @@ define DDRESCUE_CONFIGURE_CMDS
 	)
 endef
 
+ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180),y)
+DDRESCUE_CXXFLAGS += $(TARGET_CXXFLAGS) -O0
+endif
+
 define DDRESCUE_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
+	$(TARGET_MAKE_ENV) $(MAKE) CXXFLAGS="$(DDRESCUE_CXXFLAGS)" -C $(@D)
 endef
 
 define DDRESCUE_INSTALL_TARGET_CMDS
Signature · 1 line
2.17.1
#13 lore raw

PATCH v2 4/12 package/ddrescue: fix BUG_85180 build timeout

Quoted 9 lines · On Tue, 21 May 2019 15:39:24 +0200 Giulio Benetti…

With Microblaze Gcc version < 8.x build hangs on compiling first files. This is due to bug 85180:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85180
Bug shows up building ddrescue with optimization but not when building with -O0.

If BR2_TOOLCHAIN_HAS_GCC_BUG_85180=y force using -O0 passing it to CXXFLAGS.

Quoted 7 lines

Fixes:
http://autobuild.buildroot.net/results/2af/2af69401acb76be3d3fd427d1c58fed3af33bf9b/

---
 package/ddrescue/ddrescue.mk | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Applied to master after tweaking the CFLAGS logic and the commit log. Thanks!

Thomas

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

PATCH v2 4/12 package/ddrescue: fix BUG_85180 build timeout

In reply to Giulio Benetti
Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Giulio" == Giulio Benetti <[email protected]> writes:

With Microblaze Gcc version < 8.x build hangs on compiling first files. This is due to bug 85180:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85180
Bug shows up building ddrescue with optimization but not when building with -O0.

Quoted 7 lines

If BR2_TOOLCHAIN_HAS_GCC_BUG_85180=y force using -O0 passing it to CXXFLAGS.

Fixes:
http://autobuild.buildroot.net/results/2af/2af69401acb76be3d3fd427d1c58fed3af33bf9b/

Committed to 2019.02.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#15 lore raw

PATCH v2 5/12 package/flare-engine: fix BUG_85180 build timeout

In reply to Giulio Benetti

With Microblaze Gcc version < 8.x build hangs on compiling last files. This is due to bug 85180:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85180
Bug shows up building flare-engine with optimization but not when building with -O0.

If BR2_TOOLCHAIN_HAS_GCC_BUG_85180=y force using -O0 by:
- setting CMAKE_BUILD_TYPE to Dummy to avoid CMakeLists.txt to impose -O* and -g* flags
- pass -O0 to CXXFLAGS to override previous -O flags
Then remove 'depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_85180' and its comment if not available in Config.in

Fixes:
http://autobuild.buildroot.net/results/706/7065e14917a8bbc0faf21b29183ac55b6c800ee3/

---
 package/flare-engine/Config.in       | 4 ----
 package/flare-engine/flare-engine.mk | 6 ++++++
 2 files changed, 6 insertions(+), 4 deletions(-)
package/flare-engine/Config.in +0 -4
index e299a6b7de..cdcb018948 100644
@@ -2,7 +2,6 @@ config BR2_PACKAGE_FLARE_ENGINE
 	bool "flare-engine"
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on !BR2_STATIC_LIBS # SDL2
-	depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_85180
 	select BR2_PACKAGE_SDL2
 	select BR2_PACKAGE_SDL2_IMAGE
 	select BR2_PACKAGE_SDL2_MIXER
@@ -18,6 +17,3 @@ config BR2_PACKAGE_FLARE_ENGINE
 
 comment "flare-engine needs a toolchain w/ C++, dynamic library"
 	depends on !BR2_INSTALL_LIBSTDCPP || BR2_STATIC_LIBS
-
-comment "flare-engine needs a toolchain not affected by GCC bug 85180"
-	depends on BR2_TOOLCHAIN_HAS_GCC_BUG_85180
package/flare-engine/flare-engine.mk +6 -0
index 2f36602348..a9d506e220 100644
@@ -19,4 +19,10 @@ ifeq ($(BR2_ENABLE_DEBUG),y)
 FLARE_ENGINE_CONF_OPTS += -DCMAKE_BUILD_TYPE=RelWithDebInfo
 endif
 
+ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180),y)
+# Avoid CMakeLists.txt to impose "-O* -g*" flags
+FLARE_ENGINE_CONF_OPTS += -DCMAKE_BUILD_TYPE=Dummy
+FLARE_ENGINE_CONF_OPTS += -DCMAKE_CXX_FLAGS="$(TARGET_CXXFLAGS) -O0"
+endif
+
 $(eval $(cmake-package))
Signature · 1 line
2.17.1
#16 lore raw

PATCH v2 5/12 package/flare-engine: fix BUG_85180 build timeout

Quoted 9 lines · On Tue, 21 May 2019 15:39:25 +0200 Giulio Benetti…

With Microblaze Gcc version < 8.x build hangs on compiling last files. This is due to bug 85180:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85180
Bug shows up building flare-engine with optimization but not when building with -O0.

If BR2_TOOLCHAIN_HAS_GCC_BUG_85180=y force using -O0 by:
- setting CMAKE_BUILD_TYPE to Dummy to avoid CMakeLists.txt to impose -O* and -g* flags

Why does flare-engine need this, but not jasper, which is also a CMake-based package ?

Thanks,

Thomas

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

PATCH v2 5/12 package/flare-engine: fix BUG_85180 build timeout

Hello Thomas,

Il 24/05/2019 21:58, Thomas Petazzoni ha scritto:

Quoted 9 lines
Quoted 6 lines · On Tue, 21 May 2019 15:39:25 +0200 Giulio Benetti…

With Microblaze Gcc version < 8.x build hangs on compiling last files. This is due to bug 85180:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85180
Bug shows up building flare-engine with optimization but not when building with -O0.

Quoted 6 lines
Quoted 3 lines

If BR2_TOOLCHAIN_HAS_GCC_BUG_85180=y force using -O0 by:
- setting CMAKE_BUILD_TYPE to Dummy to avoid CMakeLists.txt to impose -O* and -g* flags

Why does flare-engine need this, but not jasper, which is also a CMake-based package ?

Because in flare-engine CMakeLists.txt there is no fallback to -O0, so that was the only decent way to force CMake to generate Makefiles without optimizations. I don't like it very much but it was the only way I've found.

Thank you for reviewing and improving all commit logs!

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
Quoted 4 lines

Thanks,

Thomas

#18 lore raw

PATCH v2 5/12 package/flare-engine: fix BUG_85180 build timeout

Quoted 6 lines · On Fri, 24 May 2019 22:05:12 +0200 Giulio Benetti…
Quoted 2 lines

Why does flare-engine need this, but not jasper, which is also a CMake-based package ?

Because in flare-engine CMakeLists.txt there is no fallback to -O0, so that was the only decent way to force CMake to generate Makefiles without optimizations.

Could you be more specific ? How does it work for jasper and libcpprestsdk, which are also based on CMake ?

Thanks,

Thomas

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

PATCH v2 5/12 package/flare-engine: fix BUG_85180 build timeout

Hello Thomas,

Il 24/05/2019 22:30, Thomas Petazzoni ha scritto:

Quoted 6 lines
Quoted 3 lines · On Fri, 24 May 2019 22:05:12 +0200 Giulio Benetti…
Quoted 2 lines

Why does flare-engine need this, but not jasper, which is also a CMake-based package ?

Quoted 6 lines
Quoted 3 lines

Because in flare-engine CMakeLists.txt there is no fallback to -O0, so that was the only decent way to force CMake to generate Makefiles without optimizations.

Could you be more specific ? How does it work for jasper and libcpprestsdk, which are also based on CMake ?

Yes, the problem here is that even if there's the way to append something to CMAKE_CXX_FLAGS, then any other CMAKE_CXX_FLAGS_* will be appended, so if I set CMAKE_CXX_FLAGS to -O0, I will obtain "-O0 -O2 -g".

This is due to the fact that we fall into one of the cases of the next if-elseif statements(in CMakeLists.txt):
"
if(CMAKE_BUILD_TYPE STREQUAL "Release")
set(CMAKE_CXX_FLAGS_RELEASE "-O2 -g0")
if(MINGW)
set(CMAKE_CXX_FLAGS_RELEASE "-Wl,-subsystem,windows
${CMAKE_CXX_FLAGS_RELEASE}")
endif()
elseif(CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g")
elseif(CMAKE_BUILD_TYPE STREQUAL "MinSizeRel")
set(CMAKE_CXX_FLAGS_MINSIZEREL "-Os -g0")
elseif(CMAKE_BUILD_TYPE STREQUAL "Debug")
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g3 -pg") set(CMAKE_EXE_LINKER_FLAGS_DEBUG "-pg") set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "-pg") set(CMAKE_MODULE_LINKER_FLAGS_DEBUG "-pg")
endif()
"
where Release is the default and if BR2_ENABLE_DEBUG=y CMAKE_BUILD_TYPE=RelWithDebInfo according to flare-engine.mk So I thought to set CMAKE_BUILD_TYPE to "Dummy" to jump over that if-elseif. But just right now I've realized that's enough to give -DCMAKE_BUILD_TYPE=
Empty is enough to jump over if-elseif.
Another way would be to patch CMakeLists.txt adding a fallback "else" to those if-elseif

What do you think?

Best regards

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
#20 lore raw

PATCH v2 5/12 package/flare-engine: fix BUG_85180 build timeout

Quoted 20 lines · Giulio Benetti

Hello Thomas,

Il 24/05/2019 22:30, Thomas Petazzoni ha scritto:

Quoted 6 lines
Quoted 3 lines · On Fri, 24 May 2019 22:05:12 +0200 Giulio Benetti…
Quoted 2 lines

Why does flare-engine need this, but not jasper, which is also a CMake-based package ?

Quoted 6 lines
Quoted 3 lines

Because in flare-engine CMakeLists.txt there is no fallback to -O0, so that was the only decent way to force CMake to generate Makefiles without optimizations.

Could you be more specific ? How does it work for jasper and libcpprestsdk, which are also based on CMake ?

Yes, the problem here is that even if there's the way to append something to CMAKE_CXX_FLAGS, then any other CMAKE_CXX_FLAGS_* will be appended, so if I set CMAKE_CXX_FLAGS to -O0, I will obtain "-O0 -O2 -g".

Quoted 5 lines

This is due to the fact that we fall into one of the cases of the next if-elseif statements(in CMakeLists.txt):
"
if(CMAKE_BUILD_TYPE STREQUAL "Release")
? set(CMAKE_CXX_FLAGS_RELEASE "-O2 -g0")

Note that you could also get away without overriding CMAKE_BUILD_TYPE, and just
setting CMAKE_CXX_FLAGS_RELEASE. Definitions passed on the command line will override the ones in CMakeFiles.txt (at least, I think so...).

However, since we now still set CMAKE_BUILD_TYPE based on BR2_ENABLE_DEBUG,
that won't work :-(

Quoted 14 lines

? if(MINGW)
??? set(CMAKE_CXX_FLAGS_RELEASE "-Wl,-subsystem,windows ${CMAKE_CXX_FLAGS_RELEASE}")
? endif()
elseif(CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo") ? set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g") elseif(CMAKE_BUILD_TYPE STREQUAL "MinSizeRel") ? set(CMAKE_CXX_FLAGS_MINSIZEREL "-Os -g0") elseif(CMAKE_BUILD_TYPE STREQUAL "Debug")
? set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g3 -pg")
? set(CMAKE_EXE_LINKER_FLAGS_DEBUG "-pg")
? set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "-pg")
? set(CMAKE_MODULE_LINKER_FLAGS_DEBUG "-pg") endif()

Quoted 8 lines

"
where Release is the default and if BR2_ENABLE_DEBUG=y CMAKE_BUILD_TYPE=RelWithDebInfo according to flare-engine.mk
So I thought to set CMAKE_BUILD_TYPE to "Dummy" to jump over that if-elseif. But just right now I've realized that's enough to give -DCMAKE_BUILD_TYPE= Empty is enough to jump over if-elseif.
Another way would be to patch CMakeLists.txt adding a fallback "else" to those if-elseif

Another interesting example to consider how we should handle the
CMAKE_BUILD_TYPE...

We could just always set CMAKE_BUILD_TYPE to Dummy or empty or whatever.
However, I'm not sure if that's the right thing to do. For other package infras, we pass the optimisation options in CFLAGS, which still gives packages the opportunity to change or override them. Looking at a few autotools packages, they seem to generally append stuff to CFLAGS, but not really override it - and autoconf itself takes care of not overriding user-passed CFLAGS. CMake packages, on the other hand, seem to mess a lot more with optimisation flags (like the example above). Also, I have the impression that CMake packages tend to also override CMAKE_C_FLAGS (rather than append to it or override CMAKE_C_FLAGS_RELEASE).

My feeling *at this time* is that the best option would be to set:

CMAKE_BUILD_TYPE=Buildroot
CMAKE_C_FLAGS_BUILDROOT=@TARGET_CFLAGS@

and not set CMAKE_C_FLAGS at all. For packages that do something sensible and necessary under a BUILD_TYPE == Release condition, we can still do package-specific override of BUILD_TYPE. And for packages that need something extra, we can pass -DCMAKE_C_FLAGS_BUILDROOT="$(TARGET_CFLAGS) -O0"

But it's very hard to be sure what is the best way, and what will cause the
least amount of breakage... So, to have the least amount of breakage, it would be better to stick to CMAKE_BUILD_TYPE=Release and live with the fact that many packages will override the optimisation flags...

Bwerk, difficult to decide...

Let's add Yann to the already huge Cc list :-)

Regards,
Arnout

#21 lore raw

PATCH v2 5/12 package/flare-engine: fix BUG_85180 build timeout

Quoted 29 lines · Arnout Vandecappelle
Quoted 20 lines · Giulio Benetti

Hello Thomas,

Il 24/05/2019 22:30, Thomas Petazzoni ha scritto:

Quoted 6 lines
Quoted 3 lines · On Fri, 24 May 2019 22:05:12 +0200 Giulio Benetti…
Quoted 2 lines

Why does flare-engine need this, but not jasper, which is also a CMake-based package ?

Quoted 6 lines
Quoted 3 lines

Because in flare-engine CMakeLists.txt there is no fallback to -O0, so that was the only decent way to force CMake to generate Makefiles without optimizations.

Could you be more specific ? How does it work for jasper and libcpprestsdk, which are also based on CMake ?

Yes, the problem here is that even if there's the way to append something to CMAKE_CXX_FLAGS, then any other CMAKE_CXX_FLAGS_* will be appended, so if I set CMAKE_CXX_FLAGS to -O0, I will obtain "-O0 -O2 -g".

Quoted 5 lines

This is due to the fact that we fall into one of the cases of the next if-elseif statements(in CMakeLists.txt):
"
if(CMAKE_BUILD_TYPE STREQUAL "Release")
? set(CMAKE_CXX_FLAGS_RELEASE "-O2 -g0")

Quoted 6 lines

Note that you could also get away without overriding CMAKE_BUILD_TYPE, and just
setting CMAKE_CXX_FLAGS_RELEASE. Definitions passed on the command line will override the ones in CMakeFiles.txt (at least, I think so...).

However, since we now still set CMAKE_BUILD_TYPE based on BR2_ENABLE_DEBUG,
that won't work :-(

Because of this (and because we can't wait for CMake refactoring), I've
improved the comment in the .mk file a little and also rewrote the commit log based on what Thomas wrote for the other commits, and applied to master, thanks.

Regards,
Arnout

[snip]

#22 lore raw

PATCH v2 5/12 package/flare-engine: fix BUG_85180 build timeout

Il 27/05/2019 23:44, Arnout Vandecappelle ha scritto:

Quoted 36 lines · Arnout Vandecappelle
Quoted 33 lines · Giulio Benetti
Quoted 20 lines

Hello Thomas,

Il 24/05/2019 22:30, Thomas Petazzoni ha scritto:

Quoted 6 lines
Quoted 3 lines · On Fri, 24 May 2019 22:05:12 +0200 Giulio Benetti…
Quoted 2 lines

Why does flare-engine need this, but not jasper, which is also a CMake-based package ?

Quoted 6 lines
Quoted 3 lines

Because in flare-engine CMakeLists.txt there is no fallback to -O0, so that was the only decent way to force CMake to generate Makefiles without optimizations.

Could you be more specific ? How does it work for jasper and libcpprestsdk, which are also based on CMake ?

Yes, the problem here is that even if there's the way to append something to CMAKE_CXX_FLAGS, then any other CMAKE_CXX_FLAGS_* will be appended, so if I set CMAKE_CXX_FLAGS to -O0, I will obtain "-O0 -O2 -g".

Quoted 5 lines

This is due to the fact that we fall into one of the cases of the next if-elseif statements(in CMakeLists.txt):
"
if(CMAKE_BUILD_TYPE STREQUAL "Release")
? set(CMAKE_CXX_FLAGS_RELEASE "-O2 -g0")

Note that you could also get away without overriding CMAKE_BUILD_TYPE, and just
setting CMAKE_CXX_FLAGS_RELEASE. Definitions passed on the command line will override the ones in CMakeFiles.txt (at least, I think so...).

Quoted 6 lines
Quoted 2 lines

However, since we now still set CMAKE_BUILD_TYPE based on BR2_ENABLE_DEBUG,
that won't work :-(

Because of this (and because we can't wait for CMake refactoring), I've
improved the comment in the .mk file a little and also rewrote the commit log based on what Thomas wrote for the other commits, and applied to master, thanks.

Thank you instead!

Best regards

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
#23 lore raw

PATCH v2 6/12 package/glibmm: fix BUG_85180 build timeout

In reply to Giulio Benetti

With Microblaze Gcc version < 8.x build hangs on compiling first files. This is due to bug 85180:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85180
Bug shows up building glibmm with optimization but not when building with -O0.

If BR2_TOOLCHAIN_HAS_GCC_BUG_85180=y force using -O0 passing it to CXXFLAGS.

Fixes:
http://autobuild.buildroot.net/results/e19/e196d77626b877dc3454d21febe20a04877c02a9/

---
 package/glibmm/glibmm.mk | 4 ++++
 1 file changed, 4 insertions(+)
package/glibmm/glibmm.mk +4 -0
index 71f1dfd36f..06dc9f92e2 100644
@@ -13,4 +13,8 @@ GLIBMM_SITE = http://ftp.gnome.org/pub/gnome/sources/glibmm/$(GLIBMM_VERSION_MAJ
 GLIBMM_INSTALL_STAGING = YES
 GLIBMM_DEPENDENCIES = libglib2 libsigc host-pkgconf
 
+ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180),y)
+GLIBMM_CONF_ENV += CXXFLAGS="$(TARGET_CXXFLAGS) -O0"
+endif
+
 $(eval $(autotools-package))
Signature · 1 line
2.17.1
#24 lore raw

PATCH v2 6/12 package/glibmm: fix BUG_85180 build timeout

Quoted 9 lines · On Tue, 21 May 2019 15:39:26 +0200 Giulio Benetti…

With Microblaze Gcc version < 8.x build hangs on compiling first files. This is due to bug 85180:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85180
Bug shows up building glibmm with optimization but not when building with -O0.

If BR2_TOOLCHAIN_HAS_GCC_BUG_85180=y force using -O0 passing it to CXXFLAGS.

Quoted 7 lines

Fixes:
http://autobuild.buildroot.net/results/e19/e196d77626b877dc3454d21febe20a04877c02a9/

---
 package/glibmm/glibmm.mk | 4 ++++
 1 file changed, 4 insertions(+)

Applied to master after tweaking the CFLAGS logic and the commit log. Thanks!

Thomas

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

PATCH v2 6/12 package/glibmm: fix BUG_85180 build timeout

In reply to Giulio Benetti
Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Giulio" == Giulio Benetti <[email protected]> writes:

With Microblaze Gcc version < 8.x build hangs on compiling first files. This is due to bug 85180:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85180
Bug shows up building glibmm with optimization but not when building with -O0.

Quoted 7 lines

If BR2_TOOLCHAIN_HAS_GCC_BUG_85180=y force using -O0 passing it to CXXFLAGS.

Fixes:
http://autobuild.buildroot.net/results/e19/e196d77626b877dc3454d21febe20a04877c02a9/

Committed to 2019.02.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#26 lore raw

PATCH v2 7/12 package/gst-ffmpeg: re-enable package if BUG_85180 is present

In reply to Giulio Benetti

With Microblaze Gcc version < 8.x build hangs on compiling first files. This is due to bug 85180:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85180
This package has been excluded from building if BUG_85180 is present. Bug shows up building gst-ffmpeg with optimization but not when building with -O0.

In config.mk if BR2_TOOLCHAIN_HAS_GCC_BUG_85180=y force using -O0 by:
- add --disable-optimizations to EXTRA_OPTS
- passing -O0 to CFLAGS in CONF_ENV
Then remove 'depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_85180' and its comment if not available from Config.in

---
 package/gstreamer/gst-ffmpeg/Config.in     | 4 ----
 package/gstreamer/gst-ffmpeg/gst-ffmpeg.mk | 5 +++++
 2 files changed, 5 insertions(+), 4 deletions(-)
package/gstreamer/gst-ffmpeg/Config.in +0 -4
index 1e95d016f6..32bfdd53c6 100644
@@ -5,7 +5,6 @@ config BR2_PACKAGE_GST_FFMPEG
 	depends on !BR2_MIPS_CPU_MIPS32R6 && !BR2_MIPS_CPU_MIPS64R6
 	# triggers https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65151 on sh
 	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_5 || !BR2_sh
-	depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_85180
 	select BR2_PACKAGE_GST_PLUGINS_BASE
 	help
 	  GStreamer plugin containing one plugin with a set of
@@ -29,6 +28,3 @@ endif
 
 comment "gst-ffmpeg needs a toolchain w/ gcc >= 5"
 	depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_5 && BR2_sh
-
-comment "gst-ffmpeg needs a toolchain not affected by GCC bug 85180"
-	depends on BR2_TOOLCHAIN_HAS_GCC_BUG_85180
package/gstreamer/gst-ffmpeg/gst-ffmpeg.mk +5 -0
index 6f41efb0a5..3a29c776c3 100644
@@ -90,6 +90,11 @@ ifeq ($(BR2_STATIC_LIBS),)
 GST_FFMPEG_CONF_EXTRA_OPTS += --enable-pic
 endif
 
+ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180),y)
+GST_FFMPEG_CONF_EXTRA_OPTS += --disable-optimizations
+GST_FFMPEG_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -O0"
+endif
+
 GST_FFMPEG_CONF_OPTS += --with-ffmpeg-extra-configure="$(GST_FFMPEG_CONF_EXTRA_OPTS)"
 
 $(eval $(autotools-package))
Signature · 1 line
2.17.1
#27 lore raw

PATCH v2 7/12 package/gst-ffmpeg: re-enable package if BUG_85180 is present

Quoted 13 lines · On Tue, 21 May 2019 15:39:27 +0200 Giulio Benetti…

With Microblaze Gcc version < 8.x build hangs on compiling first files. This is due to bug 85180:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85180
This package has been excluded from building if BUG_85180 is present. Bug shows up building gst-ffmpeg with optimization but not when building with -O0.

In config.mk if BR2_TOOLCHAIN_HAS_GCC_BUG_85180=y force using -O0 by:
- add --disable-optimizations to EXTRA_OPTS
- passing -O0 to CFLAGS in CONF_ENV
Then remove 'depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_85180' and its comment if not available from Config.in

Quoted 5 lines
---
 package/gstreamer/gst-ffmpeg/Config.in     | 4 ----
 package/gstreamer/gst-ffmpeg/gst-ffmpeg.mk | 5 +++++
 2 files changed, 5 insertions(+), 4 deletions(-)

Applied to master after tweaking the CFLAGS logic and improving the commit log. Thanks!

Thomas

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

PATCH v2 7/12 package/gst-ffmpeg: re-enable package if BUG_85180 is present

In reply to Giulio Benetti
Quoted 9 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Giulio" == Giulio Benetti <[email protected]> writes:

With Microblaze Gcc version < 8.x build hangs on compiling first files. This is due to bug 85180:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85180
This package has been excluded from building if BUG_85180 is present. Bug shows up building gst-ffmpeg with optimization but not when building with -O0.

Quoted 7 lines

In config.mk if BR2_TOOLCHAIN_HAS_GCC_BUG_85180=y force using -O0 by:
- add --disable-optimizations to EXTRA_OPTS
- passing -O0 to CFLAGS in CONF_ENV
Then remove 'depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_85180' and its comment if not available from Config.in

Committed to 2019.02.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#29 lore raw

PATCH v2 8/12 package/jasper: fix BUG_85180 build timeout

In reply to Giulio Benetti

With Microblaze Gcc version < 8.x build hangs on compiling last files before linking.
This is due to bug 85180:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85180
Bug shows up building jasper with optimization but not when building with -O0.

If BR2_TOOLCHAIN_HAS_GCC_BUG_85180=y force using -O0 passing it to CFLAGS.

Fixes:
http://autobuild.buildroot.net/results/554/5546087cdf684099525dc5824ed428cd0fd74283/

---
 package/jasper/jasper.mk | 4 ++++
 1 file changed, 4 insertions(+)
package/jasper/jasper.mk +4 -0
index b544a7c1c6..360df563fb 100644
@@ -25,4 +25,8 @@ else
 JASPER_CONF_OPTS += -DJAS_ENABLE_LIBJPEG=OFF
 endif
 
+ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180),y)
+JASPER_CONF_OPTS += -DCMAKE_C_FLAGS="$(TARGET_CFLAGS) -O0"
+endif
+
 $(eval $(cmake-package))
Signature · 1 line
2.17.1
#30 lore raw

PATCH v2 8/12 package/jasper: fix BUG_85180 build timeout

Quoted 10 lines · On Tue, 21 May 2019 15:39:28 +0200 Giulio Benetti…

With Microblaze Gcc version < 8.x build hangs on compiling last files before linking.
This is due to bug 85180:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85180
Bug shows up building jasper with optimization but not when building with -O0.

If BR2_TOOLCHAIN_HAS_GCC_BUG_85180=y force using -O0 passing it to CFLAGS.

Quoted 7 lines

Fixes:
http://autobuild.buildroot.net/results/554/5546087cdf684099525dc5824ed428cd0fd74283/

---
 package/jasper/jasper.mk | 4 ++++
 1 file changed, 4 insertions(+)

Applied to master after tweaking the CFLAGS logic and the commit log. Thanks!

Thomas

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

PATCH v2 8/12 package/jasper: fix BUG_85180 build timeout

In reply to Giulio Benetti
Quoted 9 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Giulio" == Giulio Benetti <[email protected]> writes:

With Microblaze Gcc version < 8.x build hangs on compiling last files before linking.
This is due to bug 85180:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85180
Bug shows up building jasper with optimization but not when building with -O0.

Quoted 7 lines

If BR2_TOOLCHAIN_HAS_GCC_BUG_85180=y force using -O0 passing it to CFLAGS.

Fixes:
http://autobuild.buildroot.net/results/554/5546087cdf684099525dc5824ed428cd0fd74283/

Committed to 2019.02.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#32 lore raw

PATCH v2 9/12 package/kismet: fix BUG_85180 build timeout

In reply to Giulio Benetti

With Microblaze Gcc version < 8.x build hangs on compiling first files. This is due to bug 85180:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85180
Bug shows up building kismet with optimization but not when building with -O0.

If BR2_TOOLCHAIN_HAS_GCC_BUG_85180=y force using -O0 passing it to CXXFLAGS.

Fixes:
http://autobuild.buildroot.net/results/02f/02f6e616631f05a4f15f31f2b2e67d65ba7afcb0/

---
 package/kismet/kismet.mk | 4 ++++
 1 file changed, 4 insertions(+)
package/kismet/kismet.mk +4 -0
index cee814b52b..b06106f58b 100644
@@ -15,6 +15,10 @@ KISMET_LICENSE_FILES = debian/copyright
 # We touch configure.in:
 KISMET_AUTORECONF = YES
 
+ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180),y)
+KISMET_CONF_ENV += CXXFLAGS="$(TARGET_CXXFLAGS) -O0"
+endif
+
 ifeq ($(BR2_PACKAGE_LIBCAP),y)
 KISMET_DEPENDENCIES += libcap
 endif
Signature · 1 line
2.17.1
#33 lore raw

PATCH v2 9/12 package/kismet: fix BUG_85180 build timeout

Quoted 9 lines · On Tue, 21 May 2019 15:39:29 +0200 Giulio Benetti…

With Microblaze Gcc version < 8.x build hangs on compiling first files. This is due to bug 85180:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85180
Bug shows up building kismet with optimization but not when building with -O0.

If BR2_TOOLCHAIN_HAS_GCC_BUG_85180=y force using -O0 passing it to CXXFLAGS.

Quoted 7 lines

Fixes:
http://autobuild.buildroot.net/results/02f/02f6e616631f05a4f15f31f2b2e67d65ba7afcb0/

---
 package/kismet/kismet.mk | 4 ++++
 1 file changed, 4 insertions(+)

Applied to master after tweaking the CFLAGS logic and the commit log. Thanks!

Thomas

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

PATCH v2 9/12 package/kismet: fix BUG_85180 build timeout

In reply to Giulio Benetti
Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Giulio" == Giulio Benetti <[email protected]> writes:

With Microblaze Gcc version < 8.x build hangs on compiling first files. This is due to bug 85180:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85180
Bug shows up building kismet with optimization but not when building with -O0.

Quoted 7 lines

If BR2_TOOLCHAIN_HAS_GCC_BUG_85180=y force using -O0 passing it to CXXFLAGS.

Fixes:
http://autobuild.buildroot.net/results/02f/02f6e616631f05a4f15f31f2b2e67d65ba7afcb0/

Committed to 2019.02.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#35 lore raw

PATCH v2 10/12 package/libcpprestsdk: fix BUG_85180 build timeout

In reply to Giulio Benetti

With Microblaze Gcc version < 8.x build hangs on compiling first files. This is due to bug 85180:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85180
Bug shows up building libcpprestsdk with optimization but not when building with -O0.

If BR2_TOOLCHAIN_HAS_GCC_BUG_85180=y force using -O0 passing it to CXXFLAGS.

Fixes:
http://autobuild.buildroot.net/results/706/7065e14917a8bbc0faf21b29183ac55b6c800ee3/

---
 package/libcpprestsdk/libcpprestsdk.mk | 4 ++++
 1 file changed, 4 insertions(+)
package/libcpprestsdk/libcpprestsdk.mk +4 -0
index e8dddeddd7..4be2cb20fb 100644
@@ -36,4 +36,8 @@ else
 LIBCPPRESTSDK_CONF_OPTS += -DCPPREST_EXCLUDE_WEBSOCKETS=ON
 endif
 
+ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180),y)
+LIBCPPRESTSDK_CONF_OPTS += -DCMAKE_CXX_FLAGS="$(TARGET_CXXFLAGS) -O0"
+endif
+
 $(eval $(cmake-package))
Signature · 1 line
2.17.1
#36 lore raw

PATCH v2 10/12 package/libcpprestsdk: fix BUG_85180 build timeout

Quoted 22 lines · On Tue, 21 May 2019 15:39:30 +0200 Giulio Benetti…

With Microblaze Gcc version < 8.x build hangs on compiling first files. This is due to bug 85180:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85180
Bug shows up building libcpprestsdk with optimization but not when building with -O0.

If BR2_TOOLCHAIN_HAS_GCC_BUG_85180=y force using -O0 passing it to CXXFLAGS.

Fixes:
http://autobuild.buildroot.net/results/706/7065e14917a8bbc0faf21b29183ac55b6c800ee3/

---
 package/libcpprestsdk/libcpprestsdk.mk | 4 ++++
 1 file changed, 4 insertions(+)
package/libcpprestsdk/libcpprestsdk.mk +0 -0
index e8dddeddd7..4be2cb20fb 100644

package/libcpprestsdk/libcpprestsdk.mk else · line 41

Quoted 6 lines
package/libcpprestsdk/libcpprestsdk.mk +3 -0
@@ -36,4 +36,8 @@ else
 LIBCPPRESTSDK_CONF_OPTS += -DCPPREST_EXCLUDE_WEBSOCKETS=ON
 endif
 
+ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180),y)
+LIBCPPRESTSDK_CONF_OPTS += -DCMAKE_CXX_FLAGS="$(TARGET_CXXFLAGS) -O0"
+endif

This package is another example why this approach to override CXXFLAGS is not good. Indeed, after your commit, the package contained this:

ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y) LIBCPPRESTSDK_CONF_OPTS += -DCMAKE_CXX_FLAGS="$(TARGET_CXXFLAGS) -latomic" endif

ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180),y) LIBCPPRESTSDK_CONF_OPTS += -DCMAKE_CXX_FLAGS="$(TARGET_CXXFLAGS) -O0" endif

Guess what happens when BR2_TOOLCHAIN_HAS_LIBATOMIC=y *and* BR2_TOOLCHAIN_HAS_GCC_BUG_85180=y ? You loose the -latomic flag. That's why I really prefer that we define an intermediate <pkg>_CXXFLAGS variable.

I fixed that up, improved the commit log and applied to master. Thanks!

Thomas

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

PATCH v2 10/12 package/libcpprestsdk: fix BUG_85180 build timeout

Il 24/05/2019 22:03, Thomas Petazzoni ha scritto:

Quoted 39 lines
Quoted 22 lines · On Tue, 21 May 2019 15:39:30 +0200 Giulio Benetti…

With Microblaze Gcc version < 8.x build hangs on compiling first files. This is due to bug 85180:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85180
Bug shows up building libcpprestsdk with optimization but not when building with -O0.

If BR2_TOOLCHAIN_HAS_GCC_BUG_85180=y force using -O0 passing it to CXXFLAGS.

Fixes:
http://autobuild.buildroot.net/results/706/7065e14917a8bbc0faf21b29183ac55b6c800ee3/

---
  package/libcpprestsdk/libcpprestsdk.mk | 4 ++++
  1 file changed, 4 insertions(+)
package/libcpprestsdk/libcpprestsdk.mk +0 -0
index e8dddeddd7..4be2cb20fb 100644

package/libcpprestsdk/libcpprestsdk.mk else · line 41

Quoted 6 lines
package/libcpprestsdk/libcpprestsdk.mk +3 -0
@@ -36,4 +36,8 @@ else
  LIBCPPRESTSDK_CONF_OPTS += -DCPPREST_EXCLUDE_WEBSOCKETS=ON
  endif
 
+ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180),y)
+LIBCPPRESTSDK_CONF_OPTS += -DCMAKE_CXX_FLAGS="$(TARGET_CXXFLAGS) -O0"
+endif

This package is another example why this approach to override CXXFLAGS is not good. Indeed, after your commit, the package contained this:

ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y) LIBCPPRESTSDK_CONF_OPTS += -DCMAKE_CXX_FLAGS="$(TARGET_CXXFLAGS) -latomic" endif

Quoted 8 lines

ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180),y) LIBCPPRESTSDK_CONF_OPTS += -DCMAKE_CXX_FLAGS="$(TARGET_CXXFLAGS) -O0" endif

Guess what happens when BR2_TOOLCHAIN_HAS_LIBATOMIC=y *and* BR2_TOOLCHAIN_HAS_GCC_BUG_85180=y ? You loose the -latomic flag. That's why I really prefer that we define an intermediate <pkg>_CXXFLAGS variable.

Yes, I will take that into account on next patches. Thanks for fixing and explaining!

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
Quoted 4 lines

I fixed that up, improved the commit log and applied to master. Thanks!

Thomas

#38 lore raw

PATCH v2 11/12 package/opus: fix BUG_85180 build timeout

In reply to Giulio Benetti

With Microblaze Gcc version < 8.x build hangs on compiling last files before linking.
This is due to bug 85180:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85180
Bug shows up building opus with optimization but not when building with -O0.

If BR2_TOOLCHAIN_HAS_GCC_BUG_85180=y force using -O0 passing it to CFLAGS.

Fixes:
http://autobuild.buildroot.net/results/73d/73dc9610a13d6e14eec58d529617210d93d5dec4/

---
 package/opus/opus.mk | 4 ++++
 1 file changed, 4 insertions(+)
package/opus/opus.mk +4 -0
index f23461a3af..4b127aa187 100644
@@ -10,6 +10,10 @@ OPUS_LICENSE = BSD-3-Clause
 OPUS_LICENSE_FILES = COPYING
 OPUS_INSTALL_STAGING = YES
 
+ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180),y)
+OPUS_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -O0"
+endif
+
 ifeq ($(BR2_PACKAGE_OPUS_FIXED_POINT),y)
 OPUS_CONF_OPTS += --enable-fixed-point
 endif
Signature · 1 line
2.17.1
#39 lore raw

PATCH v2 11/12 package/opus: fix BUG_85180 build timeout

Quoted 10 lines · On Tue, 21 May 2019 15:39:31 +0200 Giulio Benetti…

With Microblaze Gcc version < 8.x build hangs on compiling last files before linking.
This is due to bug 85180:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85180
Bug shows up building opus with optimization but not when building with -O0.

If BR2_TOOLCHAIN_HAS_GCC_BUG_85180=y force using -O0 passing it to CFLAGS.

Quoted 7 lines

Fixes:
http://autobuild.buildroot.net/results/73d/73dc9610a13d6e14eec58d529617210d93d5dec4/

---
 package/opus/opus.mk | 4 ++++
 1 file changed, 4 insertions(+)

Applied to master after tweaking the CFLAGS logic and improving the commit log. Thanks!

Thomas

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

PATCH v2 11/12 package/opus: fix BUG_85180 build timeout

In reply to Giulio Benetti
Quoted 9 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Giulio" == Giulio Benetti <[email protected]> writes:

With Microblaze Gcc version < 8.x build hangs on compiling last files before linking.
This is due to bug 85180:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85180
Bug shows up building opus with optimization but not when building with -O0.

Quoted 7 lines

If BR2_TOOLCHAIN_HAS_GCC_BUG_85180=y force using -O0 passing it to CFLAGS.

Fixes:
http://autobuild.buildroot.net/results/73d/73dc9610a13d6e14eec58d529617210d93d5dec4/

Committed to 2019.02.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#41 lore raw

PATCH v2 12/12 package/postgresql: fix BUG_85180 build timeout

In reply to Giulio Benetti

With Microblaze Gcc version < 8.x build hangs on compiling last files before linking.
This is due to bug 85180:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85180
Bug shows up building postgresql with optimization but not when building with -O0.

If BR2_TOOLCHAIN_HAS_GCC_BUG_85180=y force using -O0 passing it to CFLAGS.

Fixes:
http://autobuild.buildroot.net/results/53c/53c270c696ee999d541da0b09bf6a215e5335e9a/

---
 package/postgresql/postgresql.mk | 4 ++++
 1 file changed, 4 insertions(+)
package/postgresql/postgresql.mk +4 -0
index 067679bcbd..da49ca755e 100644
@@ -93,6 +93,10 @@ else
 POSTGRESQL_CONF_OPTS += --without-systemd
 endif
 
+ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180),y)
+POSTGRESQL_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -O0"
+endif
+
 define POSTGRESQL_USERS
 	postgres -1 postgres -1 * /var/lib/pgsql /bin/sh - PostgreSQL Server
 endef
Signature · 1 line
2.17.1
#42 lore raw

PATCH v2 12/12 package/postgresql: fix BUG_85180 build timeout

Quoted 10 lines · On Tue, 21 May 2019 15:39:32 +0200 Giulio Benetti…

With Microblaze Gcc version < 8.x build hangs on compiling last files before linking.
This is due to bug 85180:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85180
Bug shows up building postgresql with optimization but not when building with -O0.

If BR2_TOOLCHAIN_HAS_GCC_BUG_85180=y force using -O0 passing it to CFLAGS.

Quoted 7 lines

Fixes:
http://autobuild.buildroot.net/results/53c/53c270c696ee999d541da0b09bf6a215e5335e9a/

---
 package/postgresql/postgresql.mk | 4 ++++
 1 file changed, 4 insertions(+)

Applied to master after tweaking the CFLAGS logic and improving the commit log. Thanks!

Thomas

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

PATCH v2 12/12 package/postgresql: fix BUG_85180 build timeout

In reply to Giulio Benetti
Quoted 9 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Giulio" == Giulio Benetti <[email protected]> writes:

With Microblaze Gcc version < 8.x build hangs on compiling last files before linking.
This is due to bug 85180:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85180
Bug shows up building postgresql with optimization but not when building with -O0.

Quoted 7 lines

If BR2_TOOLCHAIN_HAS_GCC_BUG_85180=y force using -O0 passing it to CFLAGS.

Fixes:
http://autobuild.buildroot.net/results/53c/53c270c696ee999d541da0b09bf6a215e5335e9a/

Committed to 2019.02.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard