Skip to contentSkip to conversation

package/atop: fix BUG_85180 build timeout

PATCH New Giulio Benetti 3 participants 6 messages May 20, 2019 – May 21, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/atop: fix BUG_85180 build timeout

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 -g2 and -g3.

If BR2_TOOLCHAIN_HAS_GCC_BUG_85180=y and BR2_ENABLE_DEBUG=y force using -g1 passing it to CFLAGS.

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

---
 package/atop/atop.mk | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
package/atop/atop.mk +6 -1
index aaf02908c4..2e7e364d0e 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)$(BR2_ENABLE_DEBUG),yy)
+ATOP_CFLAGS += $(TARGET_CFLAGS) -g1
+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
#1 lore raw

PATCH 1/1 package/atop: fix BUG_85180 build timeout

Hello,

Quoted 5 lines · On Mon, 20 May 2019 23:27: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 atop with -g2 and -g3.

Quoted 7 lines

If BR2_TOOLCHAIN_HAS_GCC_BUG_85180=y and BR2_ENABLE_DEBUG=y force using -g1 passing it to CFLAGS.

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

I am a bit confused: the other instances of bug 85180 are worked around by passing -O0 (in glibmm, opus, chocolate-doom, jasper), but here you do the work around using -g1.

Is it expected ? Can't we have the same work around in all situations ?

Best regards,

Thomas

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

PATCH 1/1 package/atop: fix BUG_85180 build timeout

Quoted 16 lines · Thomas Petazzoni

Hello,

Quoted 11 lines · On Mon, 20 May 2019 23:27: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 atop with -g2 and -g3.

If BR2_TOOLCHAIN_HAS_GCC_BUG_85180=y and BR2_ENABLE_DEBUG=y force using -g1 passing it to CFLAGS.

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

Quoted 7 lines
Quoted 1 line

I am a bit confused: the other instances of bug 85180 are worked around by passing -O0 (in glibmm, opus, chocolate-doom, jasper), but here you do the work around using -g1.

Is it expected ? Can't we have the same work around in all situations ?

I think it's just that in *this* case, it is also solved by using -g1 instead
of -g2, which is less "aggressive" than passing -O0. However, I agree with Thomas that it's better to use the same solution everywhere, even if it is suboptimal.

Just to be sure: in some cases, -Os also works, but not in all cases, right?
Otherwise I'd actually prefer -Os instead of -O0.

Regards,
Arnout

#3 lore raw

PATCH 1/1 package/atop: fix BUG_85180 build timeout

Hello,

Quoted 4 lines · On Tue, 21 May 2019 09:55:16 +0200 Arnout Vandecappelle <[email protected]> wrote:

I think it's just that in *this* case, it is also solved by using -g1 instead
of -g2, which is less "aggressive" than passing -O0. However, I agree with Thomas that it's better to use the same solution everywhere, even if it is suboptimal.

I agree: using the same solution everywhere is better, even if slightly suboptimal here or there.

Quoted 2 lines

Just to be sure: in some cases, -Os also works, but not in all cases, right?
Otherwise I'd actually prefer -Os instead of -O0.

Agreed as well.

Thomas

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

PATCH 1/1 package/atop: fix BUG_85180 build timeout

Hello Arnout, Thomas,

Il 21/05/2019 10:02, Thomas Petazzoni ha scritto:

Quoted 5 lines

Hello,

On Tue, 21 May 2019 09:55:16 +0200
Arnout Vandecappelle <[email protected]> wrote:

Quoted 7 lines
Quoted 4 lines

I think it's just that in *this* case, it is also solved by using -g1 instead
of -g2, which is less "aggressive" than passing -O0. However, I agree with Thomas that it's better to use the same solution everywhere, even if it is suboptimal.

I agree: using the same solution everywhere is better, even if slightly suboptimal here or there.

Ok.

Quoted 2 lines
Quoted 2 lines

Just to be sure: in some cases, -Os also works, but not in all cases, right?
Otherwise I'd actually prefer -Os instead of -O0.

I've just retried with -Os, unfortunately glibmm fails while all the others work.

So I'm going to keep -O0 for every package with BUG_85180.

Thank you

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

PATCH 1/1 package/atop: fix BUG_85180 build timeout

In reply to Thomas Petazzoni

Hello Thomas,

Il 21/05/2019 09:15, Thomas Petazzoni ha scritto:

Quoted 16 lines

Hello,

Quoted 11 lines · On Mon, 20 May 2019 23:27: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 atop with -g2 and -g3.

If BR2_TOOLCHAIN_HAS_GCC_BUG_85180=y and BR2_ENABLE_DEBUG=y force using -g1 passing it to CFLAGS.

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

Quoted 7 lines
Quoted 1 line

I am a bit confused: the other instances of bug 85180 are worked around by passing -O0 (in glibmm, opus, chocolate-doom, jasper), but here you do the work around using -g1.

Is it expected ? Can't we have the same work around in all situations ?

Yes it is expected, but we can have the same workaround(-O0) for all situations.

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