[OE-core] [PATCH 1/1] grub 1.99: fix build for gcc 4.7

Kamble, Nitin A nitin.a.kamble at intel.com
Sat Apr 14 04:45:36 UTC 2012



> -----Original Message-----
> From: openembedded-core-bounces at lists.openembedded.org
> [mailto:openembedded-core-bounces at 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 at intel.com> wrote:
> >
> >
> >> -----Original Message-----
> >> From: openembedded-core-bounces at lists.openembedded.org
> >> [mailto:openembedded-core-bounces at 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 at 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 at lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core


More information about the Openembedded-core mailing list