Message ID | 20190520212723.63754-1-giulio.benetti@micronovasrl.com |
---|---|
State | Superseded, archived |
Headers | show |
Series | package/atop: fix BUG_85180 build timeout | expand |
Hello, On Mon, 20 May 2019 23:27:23 +0200 Giulio Benetti <giulio.benetti@micronovasrl.com> wrote: > 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/ > > Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com> 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
On 21/05/2019 09:15, Thomas Petazzoni wrote: > Hello, > > On Mon, 20 May 2019 23:27:23 +0200 > Giulio Benetti <giulio.benetti@micronovasrl.com> wrote: > >> 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/ >> >> Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com> > > 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
Hello Thomas, Il 21/05/2019 09:15, Thomas Petazzoni ha scritto: > Hello, > > On Mon, 20 May 2019 23:27:23 +0200 > Giulio Benetti <giulio.benetti@micronovasrl.com> wrote: > >> 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/ >> >> Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com> > > 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
Hello, On Tue, 21 May 2019 09:55:16 +0200 Arnout Vandecappelle <arnout@mind.be> 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. > 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
Hello Arnout, Thomas, Il 21/05/2019 10:02, Thomas Petazzoni ha scritto: > Hello, > > On Tue, 21 May 2019 09:55:16 +0200 > Arnout Vandecappelle <arnout@mind.be> 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. Ok. >> 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
diff --git a/package/atop/atop.mk b/package/atop/atop.mk index aaf02908c4..2e7e364d0e 100644 --- a/package/atop/atop.mk +++ b/package/atop/atop.mk @@ -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
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/ Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com> --- package/atop/atop.mk | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)