All of lore.kernel.org
 help / color / mirror / Atom feed
* todays xen-unstable is throwing gcc errors when compiling on PPC
@ 2007-07-09 20:11 Jerone Young
  2007-07-09 21:23 ` Keir Fraser
  0 siblings, 1 reply; 2+ messages in thread
From: Jerone Young @ 2007-07-09 20:11 UTC (permalink / raw)
  To: xen-devel; +Cc: xen-ppc-devel

When compiling Xen on PPC today I get the following error that is being
caused by casting (u32 *). Once the cast is removed all is well and
things compile fine. Is this happening on x86 or x86-64 ? I'm using gcc
4.1.0 on Suse SLES 10.

There Error:
grant_table.c: In function ‘gnttab_prepare_for_transfer’:
grant_table.c:825: warning: dereferencing type-punned pointer will break
strict-aliasing rules
grant_table.c: In function ‘__acquire_grant_for_copy’:
grant_table.c:1055: warning: dereferencing type-punned pointer will
break strict-aliasing rules
grant_table.c:1080: warning: dereferencing type-punned pointer will
break strict-aliasing rules
grant_table.c:1080: warning: dereferencing type-punned pointer will
break strict-aliasing rules
grant_table.c:1080: warning: dereferencing type-punned pointer will
break strict-aliasing rules
grant_table.c:1080: warning: dereferencing type-punned pointer will
break strict-aliasing rules
grant_table.c:1080: warning: dereferencing type-punned pointer will
break strict-aliasing rules
make[3]: *** [grant_table.o] Error 1
make[3]: Leaving directory `/Work/xen-unstable.hg/xen/common'
make[2]: *** [/Work/xen-unstable.hg/xen/common/built_in.o] Error 2
make[2]: Leaving directory `/Work/xen-unstable.hg/xen/arch/powerpc'
make[1]: *** [/Work/xen-unstable.hg/xen/xen] Error 2
make[1]: Leaving directory `/Work/xen-unstable.hg/xen'
make: *** [build] Error 2

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

* Re: todays xen-unstable is throwing gcc errors when compiling on PPC
  2007-07-09 20:11 todays xen-unstable is throwing gcc errors when compiling on PPC Jerone Young
@ 2007-07-09 21:23 ` Keir Fraser
  0 siblings, 0 replies; 2+ messages in thread
From: Keir Fraser @ 2007-07-09 21:23 UTC (permalink / raw)
  To: jyoung5, xen-devel; +Cc: xen-ppc-devel

This problem is caused by my patch which moved the addition of
-fno-strict-aliasing to CFLAGS into Config.mk. At the same time I *removed*
-fno-strict-aliasing from arch/{x86,powerpc,ia64}/Rules.mk. My assumption
was that everyone would simply add to the CFLAGS created by Config.mk and
xen/Rules.mk, just to add arch-specific extras.

I see you do not do this because you have a 'CFLAGS :=' in your
arch/powerpc/Rules.mk. So you need to do one of:
 1. Get rid of the 'CFLAGS :=' and simply adapt the generic CFLAGS.
 2. Add CFLAGS += -fno-strict-aliasing back into your Rules.mk.

Unless there is a good reason to do otherwise, (1) is the way to go.

 -- Keir

On 9/7/07 21:11, "Jerone Young" <jyoung5@us.ibm.com> wrote:

> When compiling Xen on PPC today I get the following error that is being
> caused by casting (u32 *). Once the cast is removed all is well and
> things compile fine. Is this happening on x86 or x86-64 ? I'm using gcc
> 4.1.0 on Suse SLES 10.
> 
> There Error:
> grant_table.c: In function Œgnttab_prepare_for_transfer¹:
> grant_table.c:825: warning: dereferencing type-punned pointer will break
> strict-aliasing rules
> grant_table.c: In function Œ__acquire_grant_for_copy¹:
> grant_table.c:1055: warning: dereferencing type-punned pointer will
> break strict-aliasing rules
> grant_table.c:1080: warning: dereferencing type-punned pointer will
> break strict-aliasing rules
> grant_table.c:1080: warning: dereferencing type-punned pointer will
> break strict-aliasing rules
> grant_table.c:1080: warning: dereferencing type-punned pointer will
> break strict-aliasing rules
> grant_table.c:1080: warning: dereferencing type-punned pointer will
> break strict-aliasing rules
> grant_table.c:1080: warning: dereferencing type-punned pointer will
> break strict-aliasing rules
> make[3]: *** [grant_table.o] Error 1
> make[3]: Leaving directory `/Work/xen-unstable.hg/xen/common'
> make[2]: *** [/Work/xen-unstable.hg/xen/common/built_in.o] Error 2
> make[2]: Leaving directory `/Work/xen-unstable.hg/xen/arch/powerpc'
> make[1]: *** [/Work/xen-unstable.hg/xen/xen] Error 2
> make[1]: Leaving directory `/Work/xen-unstable.hg/xen'
> make: *** [build] Error 2
> 
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel

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

end of thread, other threads:[~2007-07-09 21:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-09 20:11 todays xen-unstable is throwing gcc errors when compiling on PPC Jerone Young
2007-07-09 21:23 ` Keir Fraser

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.