I am observing xen-unstable build failing on i386 FC4, as seen bellow.
make -C arch/x86
make[1]: Entering directory
`/home/nitin/repo/pae/unstable.hg/xen/arch/x86''
gcc -Wdeclaration-after-statement -nostdinc -fno-builtin -fno-common
-fno-strict-aliasing -iwithprefix include -Wall -Werror
-Wno-pointer-arith -pipe -I/home/nitin/repo/pae/unstable.hg/xen/include
-I/home/nitin/repo/pae/unstable.hg/xen/include/asm-x86/mach-generic
-I/home/nitin/repo/pae/unstable.hg/xen/include/asm-x86/mach-default -O3
-fomit-frame-pointer -msoft-float -m32 -march=i686 -DNDEBUG -c mm.c -o
mm.o
cc1: warnings being treated as errors
mm.c: In function ?do_mmu_update?:
mm.c:1975: warning: ?mapcache.pfn? may be used uninitialized in this
function
mm.c:1975: warning: ?mapcache.va? may be used uninitialized in this
function
make[1]: *** [mm.o] Error 1
make[1]: Leaving directory
`/home/nitin/repo/pae/unstable.hg/xen/arch/x86''
make: *** [/home/nitin/repo/pae/unstable.hg/xen/xen] Error 2
This quick patch fixes it.
diff -r 690fc13948db7651eabbce8cc4b963342c8634dd xen/arch/x86/mm.c
--- a/xen/arch/x86/mm.c Mon Jan 30 12:35:43 2006
+++ b/xen/arch/x86/mm.c Mon Jan 30 13:47:45 2006
@@ -1972,7 +1972,7 @@
struct vcpu *v = current;
struct domain *d = v->domain;
unsigned long type_info;
- struct domain_mmap_cache mapcache, sh_mapcache;
+ struct domain_mmap_cache mapcache = {0,0,0}, sh_mapcache;
LOCK_BIGLOCK(d);
Thanks & Regards,
Nitin
------------------------------------------------------------------------
-----------
Open Source Technology Center, Intel Corp
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
On Mon, Jan 30, 2006 at 01:52:07PM -0800, Kamble, Nitin A wrote:> I am observing xen-unstable build failing on i386 FC4, as seen bellow. > mm.c:1975: warning: ?mapcache.pfn? may be used uninitialized in this > function > > mm.c:1975: warning: ?mapcache.va? may be used uninitialized in this > functionthat''s a bogus gcc4 warning. the variable is fine and not used uninitialized, i checked. I think just not using -Werror for gcc4 is a much better alternative, cf following patch. diff -r 690fc13948db xen/arch/x86/Rules.mk --- a/xen/arch/x86/Rules.mk Mon Jan 30 13:35:43 2006 +0100 +++ b/xen/arch/x86/Rules.mk Mon Jan 30 22:40:33 2006 +0000 @@ -8,7 +8,7 @@ pae ?= n CFLAGS += -nostdinc -fno-builtin -fno-common -fno-strict-aliasing -CFLAGS += -iwithprefix include -Wall -Werror -Wno-pointer-arith -pipe +CFLAGS += -iwithprefix include -Wall -Wno-pointer-arith -pipe CFLAGS += -I$(BASEDIR)/include CFLAGS += -I$(BASEDIR)/include/asm-x86/mach-generic CFLAGS += -I$(BASEDIR)/include/asm-x86/mach-default @@ -55,3 +55,7 @@ $(error gcc-3.1.x unsupported - upgrade to at least gcc-3.2.x) endif endif +ifneq ($(call gcc-ver,1),4) +# gcc 4 have lots of spurious warnings, don''t -Werror +CFLAGS += -Werror +endif -- Vincent Hanquez _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
I am fine with the new patch. Interestingly this issue is not present on x86_64 FC4. Gcc versions are different for FC4 on these architectures. FC4 I386: gcc (GCC) 4.0.1 20050727 (Red Hat 4.0.1-5) FC4 X86_64: gcc (GCC) 4.0.0 20050519 (Red Hat 4.0.0-8) Thanks & Regards, Nitin ------------------------------------------------------------------------ ----------- Open Source Technology Center, Intel Corp>-----Original Message----- >From: Vincent Hanquez [mailto:vincent.hanquez@cl.cam.ac.uk] >Sent: Monday, January 30, 2006 2:38 PM >To: Kamble, Nitin A >Cc: xen-devel@lists.xensource.com >Subject: Re: [Xen-devel] Build failure on i386 fedora core 4 > >On Mon, Jan 30, 2006 at 01:52:07PM -0800, Kamble, Nitin A wrote: >> I am observing xen-unstable build failing on i386 FC4, as seenbellow.>> mm.c:1975: warning: ?mapcache.pfn? may be used uninitialized in this >> function >> >> mm.c:1975: warning: ?mapcache.va? may be used uninitialized in this >> function > >that''s a bogus gcc4 warning. the variable is fine and not used >uninitialized, i checked. > >I think just not using -Werror for gcc4 is a much better alternative,cf>following patch. > >diff -r 690fc13948db xen/arch/x86/Rules.mk >--- a/xen/arch/x86/Rules.mk Mon Jan 30 13:35:43 2006 +0100 >+++ b/xen/arch/x86/Rules.mk Mon Jan 30 22:40:33 2006 +0000 >@@ -8,7 +8,7 @@ > pae ?= n > > CFLAGS += -nostdinc -fno-builtin -fno-common -fno-strict-aliasing >-CFLAGS += -iwithprefix include -Wall -Werror -Wno-pointer-arith -pipe >+CFLAGS += -iwithprefix include -Wall -Wno-pointer-arith -pipe > CFLAGS += -I$(BASEDIR)/include > CFLAGS += -I$(BASEDIR)/include/asm-x86/mach-generic > CFLAGS += -I$(BASEDIR)/include/asm-x86/mach-default >@@ -55,3 +55,7 @@ > $(error gcc-3.1.x unsupported - upgrade to at least gcc-3.2.x) > endif > endif >+ifneq ($(call gcc-ver,1),4) >+# gcc 4 have lots of spurious warnings, don''t -Werror >+CFLAGS += -Werror >+endif > >-- >Vincent Hanquez_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel