Patchwork [meta-fsl-ppc] e500v2: workaround for ICE of gcc-4.8.x

login
register
mail settings
Submitter Zhenhua Luo
Date July 16, 2013, 10:14 a.m.
Message ID <1373969669-13075-1-git-send-email-zhenhua.luo@freescale.com>
Download mbox | patch
Permalink /patch/53759/
State Accepted
Headers show

Comments

Zhenhua Luo - July 16, 2013, 10:14 a.m.
[Issue]
ICE appears when passing -mfloat-gprs=double for e500v2 target build with
gcc-4.8.1, the bug url is: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57717#c1

[Workaround]
Replace double-float with single-float for e500v2 build until the ICE is fixed

[TODO]
Revert the commit when the ICE bug is fixed.

Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com>
---
 conf/machine/e500v2.inc |    6 ++++++
 1 file changed, 6 insertions(+)
Otavio Salvador - July 16, 2013, 12:58 p.m.
On Tue, Jul 16, 2013 at 7:14 AM, Zhenhua Luo <zhenhua.luo@freescale.com> wrote:
> [Issue]
> ICE appears when passing -mfloat-gprs=double for e500v2 target build with
> gcc-4.8.1, the bug url is: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57717#c1
>
> [Workaround]
> Replace double-float with single-float for e500v2 build until the ICE is fixed
>
> [TODO]
> Revert the commit when the ICE bug is fixed.
>
> Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com>

Acked-by: Otavio Salvador <otavio@ossystems.com.br>

--
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://projetos.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
Zhenhua Luo - July 17, 2013, 2:20 a.m.
Applied. 


Best Regards,

Zhenhua


> -----Original Message-----
> From: otavio.salvador@gmail.com [mailto:otavio.salvador@gmail.com] On
> Behalf Of Otavio Salvador
> Sent: Tuesday, July 16, 2013 8:58 PM
> To: Luo Zhenhua-B19537
> Cc: meta-freescale@yoctoproject.org; Yu Zongchun-B40527
> Subject: Re: [meta-freescale] [meta-fsl-ppc][PATCH] e500v2: workaround
> for ICE of gcc-4.8.x
> 
> On Tue, Jul 16, 2013 at 7:14 AM, Zhenhua Luo <zhenhua.luo@freescale.com>
> wrote:
> > [Issue]
> > ICE appears when passing -mfloat-gprs=double for e500v2 target build
> > with gcc-4.8.1, the bug url is:
> > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57717#c1
> >
> > [Workaround]
> > Replace double-float with single-float for e500v2 build until the ICE
> > is fixed
> >
> > [TODO]
> > Revert the commit when the ICE bug is fixed.
> >
> > Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com>
> 
> Acked-by: Otavio Salvador <otavio@ossystems.com.br>
> 
> --
> Otavio Salvador                             O.S. Systems
> http://www.ossystems.com.br        http://projetos.ossystems.com.br
> Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750

Patch

diff --git a/conf/machine/e500v2.inc b/conf/machine/e500v2.inc
index 9688784..aabca6e 100644
--- a/conf/machine/e500v2.inc
+++ b/conf/machine/e500v2.inc
@@ -3,6 +3,12 @@  require conf/machine/include/tune-ppce500v2.inc
 MACHINE_FEATURES = "kernel26 pci ext2 ext3 serial"
 MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf"
 
+# FIXME
+# Workaround for ICE of gcc-4.8.x when passing -mfloat-gprs=double
+# Bug: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57717#c1
+# Replace double-float with single-float, revert the commit when above bug is fixed
+TUNE_CCARGS := "${@d.getVar('TUNE_CCARGS', True).replace('-mfloat-gprs=double', '-mfloat-gprs=single')}"
+
 PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk"
 PREFERRED_VERSION_virtual/kernel ?= "3.0.34"
 PREFERRED_PROVIDER_linux-libc-headers ?= "linux-qoriq-sdk-headers"