All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/syslogd: workaround a compiler bug with CS powerpc 2012.03
@ 2016-02-14 10:55 Romain Naour
  2016-02-14 20:51 ` Thomas Petazzoni
  2016-02-16 22:11 ` Peter Korsgaard
  0 siblings, 2 replies; 5+ messages in thread
From: Romain Naour @ 2016-02-14 10:55 UTC (permalink / raw)
  To: buildroot

The O3 optimization triggers a compiler bug with this toolchain,
change it with 02.

Fixes:
http://autobuild.buildroot.net/results/2fb/2fb94ecfdc32761a09da35e6fcbdd512847ec911

Signed-off-by: Romain Naour <romain.naour@gmail.com>
---
 package/sysklogd/sysklogd.mk | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/package/sysklogd/sysklogd.mk b/package/sysklogd/sysklogd.mk
index de2edf4..9e315bc 100644
--- a/package/sysklogd/sysklogd.mk
+++ b/package/sysklogd/sysklogd.mk
@@ -14,6 +14,14 @@ ifeq ($(BR2_PACKAGE_BUSYBOX),y)
 SYSKLOGD_DEPENDENCIES = busybox
 endif
 
+# CS PowerPC 2012.03 triggers compiler bug.
+ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC_E500V2),y)
+define SYSKLOGD_WORKAROUND_COMPILER_BUG
+	$(SED) 's/-O3/-O2/' $(@D)/Makefile
+endef
+SYSKLOGD_POST_PATCH_HOOKS = SYSKLOGD_WORKAROUND_COMPILER_BUG
+endif
+
 define SYSKLOGD_BUILD_CMDS
 	$(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D)
 endef
-- 
2.4.3

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

* [Buildroot] [PATCH] package/syslogd: workaround a compiler bug with CS powerpc 2012.03
  2016-02-14 10:55 [Buildroot] [PATCH] package/syslogd: workaround a compiler bug with CS powerpc 2012.03 Romain Naour
@ 2016-02-14 20:51 ` Thomas Petazzoni
  2016-02-16 22:11 ` Peter Korsgaard
  1 sibling, 0 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2016-02-14 20:51 UTC (permalink / raw)
  To: buildroot

Dear Romain Naour,

On Sun, 14 Feb 2016 11:55:13 +0100, Romain Naour wrote:
> The O3 optimization triggers a compiler bug with this toolchain,
> change it with 02.
> 
> Fixes:
> http://autobuild.buildroot.net/results/2fb/2fb94ecfdc32761a09da35e6fcbdd512847ec911
> 
> Signed-off-by: Romain Naour <romain.naour@gmail.com>
> ---
>  package/sysklogd/sysklogd.mk | 8 ++++++++
>  1 file changed, 8 insertions(+)

I'm not a big fan of such quirks, but sometimes we don't really have
the choice. So: applied!

Thanks,

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

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

* [Buildroot] [PATCH] package/syslogd: workaround a compiler bug with CS powerpc 2012.03
  2016-02-14 10:55 [Buildroot] [PATCH] package/syslogd: workaround a compiler bug with CS powerpc 2012.03 Romain Naour
  2016-02-14 20:51 ` Thomas Petazzoni
@ 2016-02-16 22:11 ` Peter Korsgaard
  2016-02-19 22:38   ` Romain Naour
  1 sibling, 1 reply; 5+ messages in thread
From: Peter Korsgaard @ 2016-02-16 22:11 UTC (permalink / raw)
  To: buildroot

>>>>> "Romain" == Romain Naour <romain.naour@gmail.com> writes:

 > The O3 optimization triggers a compiler bug with this toolchain,
 > change it with 02.

 > Fixes:
 > http://autobuild.buildroot.net/results/2fb/2fb94ecfdc32761a09da35e6fcbdd512847ec911

 > Signed-off-by: Romain Naour <romain.naour@gmail.com>
 > ---
 >  package/sysklogd/sysklogd.mk | 8 ++++++++
 >  1 file changed, 8 insertions(+)

 > diff --git a/package/sysklogd/sysklogd.mk b/package/sysklogd/sysklogd.mk
 > index de2edf4..9e315bc 100644
 > --- a/package/sysklogd/sysklogd.mk
 > +++ b/package/sysklogd/sysklogd.mk
 > @@ -14,6 +14,14 @@ ifeq ($(BR2_PACKAGE_BUSYBOX),y)
 >  SYSKLOGD_DEPENDENCIES = busybox
 >  endif
 
 > +# CS PowerPC 2012.03 triggers compiler bug.
 > +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC_E500V2),y)
 > +define SYSKLOGD_WORKAROUND_COMPILER_BUG
 > +	$(SED) 's/-O3/-O2/' $(@D)/Makefile

Does this mean that sysklogd isn't using our TARGET_CFLAGS (where we
most likely pass -Os)?

Why don't we fix that instead?

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH] package/syslogd: workaround a compiler bug with CS powerpc 2012.03
  2016-02-16 22:11 ` Peter Korsgaard
@ 2016-02-19 22:38   ` Romain Naour
  2016-02-20  9:21     ` Peter Korsgaard
  0 siblings, 1 reply; 5+ messages in thread
From: Romain Naour @ 2016-02-19 22:38 UTC (permalink / raw)
  To: buildroot

Hi Peter,

Le 16/02/2016 23:11, Peter Korsgaard a ?crit :

>>>>>> "Romain" == Romain Naour <romain.naour@gmail.com> writes:
>   > The O3 optimization triggers a compiler bug with this toolchain,
>   > change it with 02.
>
>   > Fixes:
>   > http://autobuild.buildroot.net/results/2fb/2fb94ecfdc32761a09da35e6fcbdd512847ec911
>
>   > Signed-off-by: Romain Naour <romain.naour@gmail.com>
>   > ---
>   >  package/sysklogd/sysklogd.mk | 8 ++++++++
>   >  1 file changed, 8 insertions(+)
>
>   > diff --git a/package/sysklogd/sysklogd.mk b/package/sysklogd/sysklogd.mk
>   > index de2edf4..9e315bc 100644
>   > --- a/package/sysklogd/sysklogd.mk
>   > +++ b/package/sysklogd/sysklogd.mk
>   > @@ -14,6 +14,14 @@ ifeq ($(BR2_PACKAGE_BUSYBOX),y)
>   >  SYSKLOGD_DEPENDENCIES = busybox
>   >  endif
>   
>   > +# CS PowerPC 2012.03 triggers compiler bug.
>   > +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC_E500V2),y)
>   > +define SYSKLOGD_WORKAROUND_COMPILER_BUG
>   > +	$(SED) 's/-O3/-O2/' $(@D)/Makefile
>
> Does this mean that sysklogd isn't using our TARGET_CFLAGS (where we
> most likely pass -Os)?

-O3 is added by SKFLAGS variable which is used as CFLAGS.
TARGET_CFLAGS is not taken into account :-/

>
> Why don't we fix that instead?
We could try to replace SKFLAGS by CFLAGS...

Best regards,
Romain
>
>

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

* [Buildroot] [PATCH] package/syslogd: workaround a compiler bug with CS powerpc 2012.03
  2016-02-19 22:38   ` Romain Naour
@ 2016-02-20  9:21     ` Peter Korsgaard
  0 siblings, 0 replies; 5+ messages in thread
From: Peter Korsgaard @ 2016-02-20  9:21 UTC (permalink / raw)
  To: buildroot

>>>>> "Romain" == Romain Naour <romain.naour@gmail.com> writes:

Hi,

 >> Does this mean that sysklogd isn't using our TARGET_CFLAGS (where we
 >> most likely pass -Os)?

 > -O3 is added by SKFLAGS variable which is used as CFLAGS.
 > TARGET_CFLAGS is not taken into account :-/

 >> 
 >> Why don't we fix that instead?
 > We could try to replace SKFLAGS by CFLAGS...

Yes, I believe simply passing SKFLAGS="$(TARGET_CFLAGS)" would work.

Can you give it a try?

-- 
Venlig hilsen,
Peter Korsgaard 

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

end of thread, other threads:[~2016-02-20  9:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-14 10:55 [Buildroot] [PATCH] package/syslogd: workaround a compiler bug with CS powerpc 2012.03 Romain Naour
2016-02-14 20:51 ` Thomas Petazzoni
2016-02-16 22:11 ` Peter Korsgaard
2016-02-19 22:38   ` Romain Naour
2016-02-20  9:21     ` Peter Korsgaard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.