All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] grub 1.99: fix build for gcc 4.7
@ 2012-04-13  9:41 Robert Yang
  2012-04-13  9:41 ` [PATCH 1/1] " Robert Yang
  2012-04-13  9:45 ` [PATCH 0/1] " Robert Yang
  0 siblings, 2 replies; 8+ messages in thread
From: Robert Yang @ 2012-04-13  9:41 UTC (permalink / raw)
  To: openembedded-core

I've done a "bitbake world" on Fedora 17 64bit (MACHINE = qemux86-64),
the failed pkgs are mklibs-native (have sent patch) and grub as far as
I know.

Will try "bitbake core-image-sato" with MACHINE = qemuarm/qemuppc/qemux86
and "bitbake world" with MACHINE = qemux86 on Fedora 17 64bit this
night.

Test info:
Have tested on:
Ubuntu 10.10
Fedora 13/16/17 x86_64

// Robert

The following changes since commit 71e95c744eaa4dda1b3237db2e13f666f121c92b:

  package_rpm.bbclass: Set tmppath for rpm to somewhere which won't conflict with the rootfs (2012-04-12 21:24:55 +0100)

are available in the git repository at:
  git://git.pokylinux.org/poky-contrib robert/grub
  http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=robert/grub

Robert Yang (1):
  grub 1.99: fix build for gcc 4.7

 meta/recipes-bsp/grub/grub_1.99.bb |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)




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

* [PATCH 1/1] grub 1.99: fix build for gcc 4.7
  2012-04-13  9:41 [PATCH 0/1] grub 1.99: fix build for gcc 4.7 Robert Yang
@ 2012-04-13  9:41 ` Robert Yang
  2012-04-13 20:20   ` Khem Raj
  2012-04-13  9:45 ` [PATCH 0/1] " Robert Yang
  1 sibling, 1 reply; 8+ messages in thread
From: Robert Yang @ 2012-04-13  9:41 UTC (permalink / raw)
  To: openembedded-core

There was an error when build with gcc 4.7 (FC 17 64bit):
| fs/zfs/zfs.c: In function 'get_filesystem_dnode':
| fs/zfs/zfs.c:1449:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
......
cc1: all warnings being treated as errors

While compare the compile command between gcc 4.4.4 and gcc 4.7.0, they
are the same (both of them have -Wall and -Werror), it seems that gcc
4.7.0 has changed its algorithm for the strict aliasing check, but I
didn't find the related information from its release note.

Add "-fno-strict-aliasing" to gcc's option would fix the problem, this
would disable the optimization for strict-aliasing.

[YOCTO #2291]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 meta/recipes-bsp/grub/grub_1.99.bb |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/meta/recipes-bsp/grub/grub_1.99.bb b/meta/recipes-bsp/grub/grub_1.99.bb
index ac66e83..f45b634 100644
--- a/meta/recipes-bsp/grub/grub_1.99.bb
+++ b/meta/recipes-bsp/grub/grub_1.99.bb
@@ -12,7 +12,7 @@ LICENSE = "GPLv3"
 LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
 
 RDEPENDS_${PN} = "diffutils freetype"
-PR = "r3"
+PR = "r4"
 
 SRC_URI = "ftp://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \
           file://grub-install.in.patch \
@@ -29,6 +29,11 @@ inherit gettext
 EXTRA_OECONF = "--with-platform=pc --disable-grub-mkfont --target=${TARGET_ARCH} --program-prefix="""
 
 do_configure() {
+    # Fix build error for gcc 4.7
+    echo "CPPFLAGS_DEFAULT += -fno-strict-aliasing" >> conf/Makefile.common
+    # Also modify Makefile.in, we can remove this when we can run autoreconf
+    sed -i 's/^CPPFLAGS_DEFAULT = \(.*\)/CPPFLAGS_DEFAULT = -fno-strict-aliasing \1/' \
+	Makefile.in grub-core/Makefile.in
     oe_runconf
 }
 
-- 
1.7.1




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

* Re: [PATCH 0/1] grub 1.99: fix build for gcc 4.7
  2012-04-13  9:41 [PATCH 0/1] grub 1.99: fix build for gcc 4.7 Robert Yang
  2012-04-13  9:41 ` [PATCH 1/1] " Robert Yang
@ 2012-04-13  9:45 ` Robert Yang
  1 sibling, 0 replies; 8+ messages in thread
From: Robert Yang @ 2012-04-13  9:45 UTC (permalink / raw)
  To: openembedded-core



On 04/13/2012 05:41 PM, Robert Yang wrote:
> I've done a "bitbake world" on Fedora 17 64bit (MACHINE = qemux86-64),

The MACHINE is qemux86 (not qemux86-64), sorry for the mistake.

> the failed pkgs are mklibs-native (have sent patch) and grub as far as
> I know.
>
> Will try "bitbake core-image-sato" with MACHINE = qemuarm/qemuppc/qemux86
> and "bitbake world" with MACHINE = qemux86 on Fedora 17 64bit this

Here should be: MACHINE = qemux86-64

// Robert

> night.
>
> Test info:
> Have tested on:
> Ubuntu 10.10
> Fedora 13/16/17 x86_64
>
> // Robert
>
> The following changes since commit 71e95c744eaa4dda1b3237db2e13f666f121c92b:
>
>    package_rpm.bbclass: Set tmppath for rpm to somewhere which won't conflict with the rootfs (2012-04-12 21:24:55 +0100)
>
> are available in the git repository at:
>    git://git.pokylinux.org/poky-contrib robert/grub
>    http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=robert/grub
>
> Robert Yang (1):
>    grub 1.99: fix build for gcc 4.7
>
>   meta/recipes-bsp/grub/grub_1.99.bb |    7 ++++++-
>   1 files changed, 6 insertions(+), 1 deletions(-)
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>



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

* Re: [PATCH 1/1] grub 1.99: fix build for gcc 4.7
  2012-04-13  9:41 ` [PATCH 1/1] " Robert Yang
@ 2012-04-13 20:20   ` Khem Raj
  2012-04-13 23:43     ` Kamble, Nitin A
  0 siblings, 1 reply; 8+ messages in thread
From: Khem Raj @ 2012-04-13 20:20 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Fri, Apr 13, 2012 at 2:41 AM, Robert Yang <liezhi.yang@windriver.com> wrote:
> There was an error when build with gcc 4.7 (FC 17 64bit):
> | fs/zfs/zfs.c: In function 'get_filesystem_dnode':
> | fs/zfs/zfs.c:1449:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
> ......
> cc1: all warnings being treated as errors
>
> While compare the compile command between gcc 4.4.4 and gcc 4.7.0, they
> are the same (both of them have -Wall and -Werror), it seems that gcc
> 4.7.0 has changed its algorithm for the strict aliasing check, but I
> didn't find the related information from its release note.
>
> Add "-fno-strict-aliasing" to gcc's option would fix the problem, this
> would disable the optimization for strict-aliasing.

This seems a bit more than whats needed. You could try adding
-Wno-error=strict-aliasing to CFLAGS

on another note. I do not see this failing with gcc-4.7(target compiler) here
when I build grub for qemux86 so I am a bit puzzled

>
> [YOCTO #2291]
>
> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
> ---
>  meta/recipes-bsp/grub/grub_1.99.bb |    7 ++++++-
>  1 files changed, 6 insertions(+), 1 deletions(-)
>
> diff --git a/meta/recipes-bsp/grub/grub_1.99.bb b/meta/recipes-bsp/grub/grub_1.99.bb
> index ac66e83..f45b634 100644
> --- a/meta/recipes-bsp/grub/grub_1.99.bb
> +++ b/meta/recipes-bsp/grub/grub_1.99.bb
> @@ -12,7 +12,7 @@ LICENSE = "GPLv3"
>  LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
>
>  RDEPENDS_${PN} = "diffutils freetype"
> -PR = "r3"
> +PR = "r4"
>
>  SRC_URI = "ftp://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \
>           file://grub-install.in.patch \
> @@ -29,6 +29,11 @@ inherit gettext
>  EXTRA_OECONF = "--with-platform=pc --disable-grub-mkfont --target=${TARGET_ARCH} --program-prefix="""
>
>  do_configure() {
> +    # Fix build error for gcc 4.7
> +    echo "CPPFLAGS_DEFAULT += -fno-strict-aliasing" >> conf/Makefile.common
> +    # Also modify Makefile.in, we can remove this when we can run autoreconf
> +    sed -i 's/^CPPFLAGS_DEFAULT = \(.*\)/CPPFLAGS_DEFAULT = -fno-strict-aliasing \1/' \
> +       Makefile.in grub-core/Makefile.in
>     oe_runconf
>  }
>
> --
> 1.7.1
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core



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

* Re: [PATCH 1/1] grub 1.99: fix build for gcc 4.7
  2012-04-13 20:20   ` Khem Raj
@ 2012-04-13 23:43     ` Kamble, Nitin A
  2012-04-14  0:41       ` Kamble, Nitin A
  2012-04-14  3:20       ` Khem Raj
  0 siblings, 2 replies; 8+ messages in thread
From: Kamble, Nitin A @ 2012-04-13 23:43 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer



> -----Original Message-----
> From: openembedded-core-bounces@lists.openembedded.org
> [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf Of
> Khem Raj
> Sent: Friday, April 13, 2012 1:21 PM
> To: Patches and discussions about the oe-core layer
> Subject: Re: [OE-core] [PATCH 1/1] grub 1.99: fix build for gcc 4.7
> 
> On Fri, Apr 13, 2012 at 2:41 AM, Robert Yang
> <liezhi.yang@windriver.com> wrote:
> > There was an error when build with gcc 4.7 (FC 17 64bit):
> > | fs/zfs/zfs.c: In function 'get_filesystem_dnode':
> > | fs/zfs/zfs.c:1449:7: error: dereferencing type-punned pointer will
> > | break strict-aliasing rules [-Werror=strict-aliasing]
> > ......
> > cc1: all warnings being treated as errors
> >
> > While compare the compile command between gcc 4.4.4 and gcc 4.7.0,
> > they are the same (both of them have -Wall and -Werror), it seems
> that
> > gcc
> > 4.7.0 has changed its algorithm for the strict aliasing check, but I
> > didn't find the related information from its release note.
> >
> > Add "-fno-strict-aliasing" to gcc's option would fix the problem,
> this
> > would disable the optimization for strict-aliasing.
> 
> This seems a bit more than whats needed. You could try adding -Wno-
> error=strict-aliasing to CFLAGS
> 
> on another note. I do not see this failing with gcc-4.7(target
> compiler) here when I build grub for qemux86 so I am a bit puzzled
> 


Khem,
  There is another grub recipe issue, it is building target binaries with distro compiler. Probably because of that you did not see issue with 4.7 cross compiler. We have fix for that issue now. 

Nitin



> >
> > [YOCTO #2291]
> >
> > Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
> > ---
> >  meta/recipes-bsp/grub/grub_1.99.bb |    7 ++++++-
> >  1 files changed, 6 insertions(+), 1 deletions(-)
> >
> > diff --git a/meta/recipes-bsp/grub/grub_1.99.bb
> > b/meta/recipes-bsp/grub/grub_1.99.bb
> > index ac66e83..f45b634 100644
> > --- a/meta/recipes-bsp/grub/grub_1.99.bb
> > +++ b/meta/recipes-bsp/grub/grub_1.99.bb
> > @@ -12,7 +12,7 @@ LICENSE = "GPLv3"
> >  LIC_FILES_CHKSUM =
> "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
> >
> >  RDEPENDS_${PN} = "diffutils freetype"
> > -PR = "r3"
> > +PR = "r4"
> >
> >  SRC_URI = "ftp://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \
> >           file://grub-install.in.patch \ @@ -29,6 +29,11 @@ inherit
> > gettext
> >  EXTRA_OECONF = "--with-platform=pc --disable-grub-mkfont --
> target=${TARGET_ARCH} --program-prefix="""
> >
> >  do_configure() {
> > +    # Fix build error for gcc 4.7
> > +    echo "CPPFLAGS_DEFAULT += -fno-strict-aliasing" >>
> > + conf/Makefile.common
> > +    # Also modify Makefile.in, we can remove this when we can run
> > + autoreconf
> > +    sed -i 's/^CPPFLAGS_DEFAULT = \(.*\)/CPPFLAGS_DEFAULT =
> > + -fno-strict-aliasing \1/' \
> > +       Makefile.in grub-core/Makefile.in
> >     oe_runconf
> >  }
> >
> > --
> > 1.7.1
> >
> >
> > _______________________________________________
> > Openembedded-core mailing list
> > Openembedded-core@lists.openembedded.org
> > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
> 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

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

* Re: [PATCH 1/1] grub 1.99: fix build for gcc 4.7
  2012-04-13 23:43     ` Kamble, Nitin A
@ 2012-04-14  0:41       ` Kamble, Nitin A
  2012-04-14  3:20       ` Khem Raj
  1 sibling, 0 replies; 8+ messages in thread
From: Kamble, Nitin A @ 2012-04-14  0:41 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer



> -----Original Message-----
> From: openembedded-core-bounces@lists.openembedded.org
> [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf Of
> Kamble, Nitin A
> Sent: Friday, April 13, 2012 4:43 PM
> To: Patches and discussions about the oe-core layer
> Subject: Re: [OE-core] [PATCH 1/1] grub 1.99: fix build for gcc 4.7
> 
> 
> 
> > -----Original Message-----
> > From: openembedded-core-bounces@lists.openembedded.org
> > [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf
> Of
> > Khem Raj
> > Sent: Friday, April 13, 2012 1:21 PM
> > To: Patches and discussions about the oe-core layer
> > Subject: Re: [OE-core] [PATCH 1/1] grub 1.99: fix build for gcc 4.7
> >
> > On Fri, Apr 13, 2012 at 2:41 AM, Robert Yang
> > <liezhi.yang@windriver.com> wrote:
> > > There was an error when build with gcc 4.7 (FC 17 64bit):
> > > | fs/zfs/zfs.c: In function 'get_filesystem_dnode':
> > > | fs/zfs/zfs.c:1449:7: error: dereferencing type-punned pointer
> will
> > > | break strict-aliasing rules [-Werror=strict-aliasing]
> > > ......
> > > cc1: all warnings being treated as errors
> > >
> > > While compare the compile command between gcc 4.4.4 and gcc 4.7.0,
> > > they are the same (both of them have -Wall and -Werror), it seems
> > that
> > > gcc
> > > 4.7.0 has changed its algorithm for the strict aliasing check, but
> I
> > > didn't find the related information from its release note.
> > >
> > > Add "-fno-strict-aliasing" to gcc's option would fix the problem,
> > this
> > > would disable the optimization for strict-aliasing.
> >
> > This seems a bit more than whats needed. You could try adding -Wno-
> > error=strict-aliasing to CFLAGS
> >
> > on another note. I do not see this failing with gcc-4.7(target
> > compiler) here when I build grub for qemux86 so I am a bit puzzled
> >
> 
> 
> Khem,
>   There is another grub recipe issue, it is building target binaries
> with distro compiler. Probably because of that you did not see issue
> with 4.7 cross compiler. We have fix for that issue now.
> 
> Nitin
> 

Khem, Look at these:

https://bugzilla.yoctoproject.org/show_bug.cgi?id=2291
https://bugzilla.yoctoproject.org/show_bug.cgi?id=2293

And both have been fixed.

Nitin

> 
> 
> > >
> > > [YOCTO #2291]
> > >
> > > Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
> > > ---
> > >  meta/recipes-bsp/grub/grub_1.99.bb |    7 ++++++-
> > >  1 files changed, 6 insertions(+), 1 deletions(-)
> > >
> > > diff --git a/meta/recipes-bsp/grub/grub_1.99.bb
> > > b/meta/recipes-bsp/grub/grub_1.99.bb
> > > index ac66e83..f45b634 100644
> > > --- a/meta/recipes-bsp/grub/grub_1.99.bb
> > > +++ b/meta/recipes-bsp/grub/grub_1.99.bb
> > > @@ -12,7 +12,7 @@ LICENSE = "GPLv3"
> > >  LIC_FILES_CHKSUM =
> > "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
> > >
> > >  RDEPENDS_${PN} = "diffutils freetype"
> > > -PR = "r3"
> > > +PR = "r4"
> > >
> > >  SRC_URI = "ftp://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \
> > >           file://grub-install.in.patch \ @@ -29,6 +29,11 @@ inherit
> > > gettext
> > >  EXTRA_OECONF = "--with-platform=pc --disable-grub-mkfont --
> > target=${TARGET_ARCH} --program-prefix="""
> > >
> > >  do_configure() {
> > > +    # Fix build error for gcc 4.7
> > > +    echo "CPPFLAGS_DEFAULT += -fno-strict-aliasing" >>
> > > + conf/Makefile.common
> > > +    # Also modify Makefile.in, we can remove this when we can run
> > > + autoreconf
> > > +    sed -i 's/^CPPFLAGS_DEFAULT = \(.*\)/CPPFLAGS_DEFAULT =
> > > + -fno-strict-aliasing \1/' \
> > > +       Makefile.in grub-core/Makefile.in
> > >     oe_runconf
> > >  }
> > >
> > > --
> > > 1.7.1
> > >
> > >
> > > _______________________________________________
> > > Openembedded-core mailing list
> > > Openembedded-core@lists.openembedded.org
> > > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-
> cor
> > > e
> >
> > _______________________________________________
> > Openembedded-core mailing list
> > Openembedded-core@lists.openembedded.org
> > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

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

* Re: [PATCH 1/1] grub 1.99: fix build for gcc 4.7
  2012-04-13 23:43     ` Kamble, Nitin A
  2012-04-14  0:41       ` Kamble, Nitin A
@ 2012-04-14  3:20       ` Khem Raj
  2012-04-14  4:45         ` Kamble, Nitin A
  1 sibling, 1 reply; 8+ messages in thread
From: Khem Raj @ 2012-04-14  3:20 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Fri, Apr 13, 2012 at 4:43 PM, Kamble, Nitin A
<nitin.a.kamble@intel.com> wrote:
>
>
>> -----Original Message-----
>> From: openembedded-core-bounces@lists.openembedded.org
>> [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf Of
>> Khem Raj
>> Sent: Friday, April 13, 2012 1:21 PM
>> To: Patches and discussions about the oe-core layer
>> Subject: Re: [OE-core] [PATCH 1/1] grub 1.99: fix build for gcc 4.7
>>
>> On Fri, Apr 13, 2012 at 2:41 AM, Robert Yang
>> <liezhi.yang@windriver.com> wrote:
>> > There was an error when build with gcc 4.7 (FC 17 64bit):
>> > | fs/zfs/zfs.c: In function 'get_filesystem_dnode':
>> > | fs/zfs/zfs.c:1449:7: error: dereferencing type-punned pointer will
>> > | break strict-aliasing rules [-Werror=strict-aliasing]
>> > ......
>> > cc1: all warnings being treated as errors
>> >
>> > While compare the compile command between gcc 4.4.4 and gcc 4.7.0,
>> > they are the same (both of them have -Wall and -Werror), it seems
>> that
>> > gcc
>> > 4.7.0 has changed its algorithm for the strict aliasing check, but I
>> > didn't find the related information from its release note.
>> >
>> > Add "-fno-strict-aliasing" to gcc's option would fix the problem,
>> this
>> > would disable the optimization for strict-aliasing.
>>
>> This seems a bit more than whats needed. You could try adding -Wno-
>> error=strict-aliasing to CFLAGS
>>
>> on another note. I do not see this failing with gcc-4.7(target
>> compiler) here when I build grub for qemux86 so I am a bit puzzled
>>
>
>
> Khem,
>  There is another grub recipe issue, it is building target binaries with distro compiler. Probably because of that you did not see issue with 4.7 cross compiler. We have fix for that issue now.

hmmm interesting that clarifies. So I guess once you fix it to do
_proper_ cross compile build then I guess the problem gets fixed when
we use gcc 4.6 but as soon as we move to gcc-4.7 this will reappear so
in any case this issue needs to fixed in a good manner I think
in anycase.



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

* Re: [PATCH 1/1] grub 1.99: fix build for gcc 4.7
  2012-04-14  3:20       ` Khem Raj
@ 2012-04-14  4:45         ` Kamble, Nitin A
  0 siblings, 0 replies; 8+ messages in thread
From: Kamble, Nitin A @ 2012-04-14  4:45 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer



> -----Original Message-----
> From: openembedded-core-bounces@lists.openembedded.org
> [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf Of
> Khem Raj
> Sent: Friday, April 13, 2012 8:20 PM
> To: Patches and discussions about the oe-core layer
> Subject: Re: [OE-core] [PATCH 1/1] grub 1.99: fix build for gcc 4.7
> 
> On Fri, Apr 13, 2012 at 4:43 PM, Kamble, Nitin A
> <nitin.a.kamble@intel.com> wrote:
> >
> >
> >> -----Original Message-----
> >> From: openembedded-core-bounces@lists.openembedded.org
> >> [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf
> >> Of Khem Raj
> >> Sent: Friday, April 13, 2012 1:21 PM
> >> To: Patches and discussions about the oe-core layer
> >> Subject: Re: [OE-core] [PATCH 1/1] grub 1.99: fix build for gcc 4.7
> >>
> >> On Fri, Apr 13, 2012 at 2:41 AM, Robert Yang
> >> <liezhi.yang@windriver.com> wrote:
> >> > There was an error when build with gcc 4.7 (FC 17 64bit):
> >> > | fs/zfs/zfs.c: In function 'get_filesystem_dnode':
> >> > | fs/zfs/zfs.c:1449:7: error: dereferencing type-punned pointer
> >> > | will break strict-aliasing rules [-Werror=strict-aliasing]
> >> > ......
> >> > cc1: all warnings being treated as errors
> >> >
> >> > While compare the compile command between gcc 4.4.4 and gcc 4.7.0,
> >> > they are the same (both of them have -Wall and -Werror), it seems
> >> that
> >> > gcc
> >> > 4.7.0 has changed its algorithm for the strict aliasing check, but
> >> > I didn't find the related information from its release note.
> >> >
> >> > Add "-fno-strict-aliasing" to gcc's option would fix the problem,
> >> this
> >> > would disable the optimization for strict-aliasing.
> >>
> >> This seems a bit more than whats needed. You could try adding -Wno-
> >> error=strict-aliasing to CFLAGS
> >>
> >> on another note. I do not see this failing with gcc-4.7(target
> >> compiler) here when I build grub for qemux86 so I am a bit puzzled
> >>
> >
> >
> > Khem,
> >  There is another grub recipe issue, it is building target binaries
> with distro compiler. Probably because of that you did not see issue
> with 4.7 cross compiler. We have fix for that issue now.
> 
> hmmm interesting that clarifies. So I guess once you fix it to do
> _proper_ cross compile build then I guess the problem gets fixed when
> we use gcc 4.6 but as soon as we move to gcc-4.7 this will reappear so
> in any case this issue needs to fixed in a good manner I think in
> anycase.
> 


The 2293 bug is about grub-efi-native which correctly uses the distro compiler. And it hits gcc 4.7 issue on fedora 17 alpha, and that is also fixed. I will send out commits in few mins.

Nitin


> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

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

end of thread, other threads:[~2012-04-14  4:55 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-13  9:41 [PATCH 0/1] grub 1.99: fix build for gcc 4.7 Robert Yang
2012-04-13  9:41 ` [PATCH 1/1] " Robert Yang
2012-04-13 20:20   ` Khem Raj
2012-04-13 23:43     ` Kamble, Nitin A
2012-04-14  0:41       ` Kamble, Nitin A
2012-04-14  3:20       ` Khem Raj
2012-04-14  4:45         ` Kamble, Nitin A
2012-04-13  9:45 ` [PATCH 0/1] " Robert Yang

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.