Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] ptpd2: fix bfin compile by avoiding gcc bug
@ 2016-11-21 18:32 Waldemar Brodkorb
  2016-11-21 21:04 ` Thomas Petazzoni
  0 siblings, 1 reply; 4+ messages in thread
From: Waldemar Brodkorb @ 2016-11-21 18:32 UTC (permalink / raw)
  To: buildroot

 Fixes:
  http://autobuild.buildroot.net/results/cb967c8af006caa9272e800968f794ca018a7a27
  http://autobuild.buildroot.net/results/9a046dc5ef390e562b89338f0afeaef14b945458

Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
---
 package/ptpd2/ptpd2.mk | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/package/ptpd2/ptpd2.mk b/package/ptpd2/ptpd2.mk
index da6a106..43b59dc 100644
--- a/package/ptpd2/ptpd2.mk
+++ b/package/ptpd2/ptpd2.mk
@@ -24,6 +24,12 @@ else
 PTPD2_CONF_OPTS += --disable-snmp
 endif
 
+# GCC bug with Os/O1/O2/O3
+# internal compiler error: in gen_add2_insn, at optabs.c:4454
+ifeq ($(BR2_bfin),y)
+PTPD2_CONF_ENV += CFLAGS="-O0"
+endif
+
 define PTPD2_INSTALL_INIT_SYSV
 	$(INSTALL) -m 755 -D package/ptpd2/S65ptpd2 \
 		$(TARGET_DIR)/etc/init.d/S65ptpd2
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH] ptpd2: fix bfin compile by avoiding gcc bug
  2016-11-21 18:32 [Buildroot] [PATCH] ptpd2: fix bfin compile by avoiding gcc bug Waldemar Brodkorb
@ 2016-11-21 21:04 ` Thomas Petazzoni
  2016-11-22 10:12   ` Waldemar Brodkorb
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Petazzoni @ 2016-11-21 21:04 UTC (permalink / raw)
  To: buildroot

Hello,

On Mon, 21 Nov 2016 19:32:18 +0100, Waldemar Brodkorb wrote:

> +# GCC bug with Os/O1/O2/O3
> +# internal compiler error: in gen_add2_insn, at optabs.c:4454
> +ifeq ($(BR2_bfin),y)
> +PTPD2_CONF_ENV += CFLAGS="-O0"

You forgot to pass $(TARGET_CFLAGS) here. With your change, we loose
TARGET_CFLAGS. So I've fixed that up and applied.

However, I continue to dislike such hacks: when the problem gets fixed
by gcc, how will we notice?

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH] ptpd2: fix bfin compile by avoiding gcc bug
  2016-11-21 21:04 ` Thomas Petazzoni
@ 2016-11-22 10:12   ` Waldemar Brodkorb
  2016-11-22 10:16     ` Thomas Petazzoni
  0 siblings, 1 reply; 4+ messages in thread
From: Waldemar Brodkorb @ 2016-11-22 10:12 UTC (permalink / raw)
  To: buildroot

Hi Thomas,
Thomas Petazzoni wrote,

> Hello,
> 
> On Mon, 21 Nov 2016 19:32:18 +0100, Waldemar Brodkorb wrote:
> 
> > +# GCC bug with Os/O1/O2/O3
> > +# internal compiler error: in gen_add2_insn, at optabs.c:4454
> > +ifeq ($(BR2_bfin),y)
> > +PTPD2_CONF_ENV += CFLAGS="-O0"
> 
> You forgot to pass $(TARGET_CFLAGS) here. With your change, we loose
> TARGET_CFLAGS. So I've fixed that up and applied.
> 
> However, I continue to dislike such hacks: when the problem gets fixed
> by gcc, how will we notice?

Either when we get notice that the PR is closed, this time I need to
create one. But we have similar issues where we already have PR's.
Or we check when a new gcc release come out, if the results from
"grep bfin package/*/*mk" are still required.

I think better then never ending autobuild failures.

best regards
 Waldemar

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH] ptpd2: fix bfin compile by avoiding gcc bug
  2016-11-22 10:12   ` Waldemar Brodkorb
@ 2016-11-22 10:16     ` Thomas Petazzoni
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2016-11-22 10:16 UTC (permalink / raw)
  To: buildroot

Hello,

On Tue, 22 Nov 2016 11:12:20 +0100, Waldemar Brodkorb wrote:

> > However, I continue to dislike such hacks: when the problem gets fixed
> > by gcc, how will we notice?  
> 
> Either when we get notice that the PR is closed, this time I need to
> create one. But we have similar issues where we already have PR's.
> Or we check when a new gcc release come out, if the results from
> "grep bfin package/*/*mk" are still required.

Maybe we need to have some kind of convention of a specific string to
include in the comment on such hacks, in order to more easily grep?

Like:

# Workaround gcc-prXYZ

or

# Workaround binutils-prXYZ

This way, we can grep for "gcc-pr" and "binutils-pr" and easily check
the status of those PRs.

> I think better then never ending autobuild failures.

For sure, I'm not claiming we should keep things as-is. It's good to
add temporary hacks, but it's also good to think about how we can at
some point remove those hacks.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-11-22 10:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-21 18:32 [Buildroot] [PATCH] ptpd2: fix bfin compile by avoiding gcc bug Waldemar Brodkorb
2016-11-21 21:04 ` Thomas Petazzoni
2016-11-22 10:12   ` Waldemar Brodkorb
2016-11-22 10:16     ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox