fix cross-compile failure ia64 on x86 of c/s 13636:583441e296a1. When cross-compiling ia64 on x86 box, compiling checker.c fails without this patch. -- yamahata _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Gerd Hoffmann
2007-Jan-30 13:49 UTC
Re: [Xen-devel] [PATCH] fix cross compiling ia64 on x86
> diff -r 5bb084098493 -r 94c3db4748b2 xen/include/public/foreign/Makefile > --- a/xen/include/public/foreign/Makefile Mon Jan 29 13:22:21 2007 +0000 > +++ b/xen/include/public/foreign/Makefile Tue Jan 30 16:51:51 2007 +0900 > @@ -14,12 +14,8 @@ clean: > rm -f *.pyc *.o *~ > > check-headers: checker > -ifeq ($(CROSS_COMPILE),) > ./checker > $(XEN_TARGET_ARCH).size > diff -u reference.size $(XEN_TARGET_ARCH).size > -else > - @echo "cross build: skipping check" > -endif > > x86_32.h: ../arch-x86/xen-x86_32.h ../arch-x86/xen.h ../xen.h $(scripts) > python mkheader.py $* $@ $(filter %.h,$^)Ok.> diff -r 5bb084098493 -r 94c3db4748b2 xen/include/public/foreign/mkchecker.py > --- a/xen/include/public/foreign/mkchecker.py Mon Jan 29 13:22:21 2007 +0000 > +++ b/xen/include/public/foreign/mkchecker.py Tue Jan 30 16:51:51 2007 +0900 > @@ -38,10 +38,7 @@ for struct in structs: > for struct in structs: > f.write(''\tprintf("%%-20s |", "%s");\n'' % struct); > for a in archs: > - if a == arch: > - s = struct; # native > - else: > - s = struct + "_" + a; > + s = struct + "_" + a; > f.write(''#ifdef %s_has_no_%s\n'' % (a, struct)); > f.write(''\tprintf("%8s", "-");\n''); > f.write("#else\n");No. I intentionally use the native version here (struct foo instead of struct foo_arch) to catch possible inconsistencies. cheers, Gerd -- Gerd Hoffmann <kraxel@suse.de> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On 30/1/07 12:22 pm, "Isaku Yamahata" <yamahata@valinux.co.jp> wrote:> fix cross-compile failure ia64 on x86 of c/s 13636:583441e296a1. > When cross-compiling ia64 on x86 box, compiling checker.c fails without > this patch.Applied, but adding a new ''middle'' hook is unfortunate. Is there perhaps a better name we could pick? Or perhaps Gerd has a better idea how to fit ia64''s needs? -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On 30/1/07 1:55 pm, "Keir Fraser" <Keir.Fraser@cl.cam.ac.uk> wrote:> On 30/1/07 12:22 pm, "Isaku Yamahata" <yamahata@valinux.co.jp> wrote: > >> fix cross-compile failure ia64 on x86 of c/s 13636:583441e296a1. >> When cross-compiling ia64 on x86 box, compiling checker.c fails without >> this patch. > > Applied, but adding a new ''middle'' hook is unfortunate. Is there perhaps a > better name we could pick? Or perhaps Gerd has a better idea how to fit ia64''s > needs?Replied to the wrong patch email. I''m talking about your patch to the domain builder of course! :-) -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On 30/1/07 12:22 pm, "Isaku Yamahata" <yamahata@valinux.co.jp> wrote:> fix cross-compile failure ia64 on x86 of c/s 13636:583441e296a1. > When cross-compiling ia64 on x86 box, compiling checker.c fails without > this patch.I excluded the change to mkchecker.py. Apart from Gerd commenting on it, it looked dodgy to me too (I can''t see why that logic would depend on build-host architecture). -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Isaku Yamahata
2007-Jan-31 02:26 UTC
Re: [Xen-devel] [PATCH] fix cross compiling ia64 on x86
On Tue, Jan 30, 2007 at 02:49:14PM +0100, Gerd Hoffmann wrote:> > diff -r 5bb084098493 -r 94c3db4748b2 xen/include/public/foreign/mkchecker.py > > --- a/xen/include/public/foreign/mkchecker.py Mon Jan 29 13:22:21 2007 +0000 > > +++ b/xen/include/public/foreign/mkchecker.py Tue Jan 30 16:51:51 2007 +0900 > > @@ -38,10 +38,7 @@ for struct in structs: > > for struct in structs: > > f.write(''\tprintf("%%-20s |", "%s");\n'' % struct); > > for a in archs: > > - if a == arch: > > - s = struct; # native > > - else: > > - s = struct + "_" + a; > > + s = struct + "_" + a; > > f.write(''#ifdef %s_has_no_%s\n'' % (a, struct)); > > f.write(''\tprintf("%8s", "-");\n''); > > f.write("#else\n"); > > No. I intentionally use the native version here (struct foo instead of > struct foo_arch) to catch possible inconsistencies.Without this hunk, checker.c doesn''t compile because checker.c is copmiled by HOSTCC, not CC. make[1]: Entering directory `/src1/yamahata/hg/xen/mkpatch/cross_compile/xen-unstable.hg/xen/include/public/foreign'' python mkheader.py x86_32 x86_32.h ../arch-x86/xen-x86_32.h ../arch-x86/xen.h ../xen.h python mkheader.py x86_64 x86_64.h ../arch-x86/xen-x86_64.h ../arch-x86/xen.h ../xen.h python mkheader.py ia64 ia64.h ../arch-ia64.h ../xen.h python mkchecker.py ia64 checker.c x86_32 x86_64 ia64 gcc -O2 -fomit-frame-pointer -DNDEBUG -std=gnu99 -Wall -Wstrict-prototypes -Wno-unused-value -Wdeclaration-after-statement -D__XEN_TOOLS__ -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -o checker checker.c checker.c: In function ''main'': checker.c:72: error: invalid application of ''sizeof'' to incomplete type ''struct pt_fpreg'' checker.c:108: error: invalid application of ''sizeof'' to incomplete type ''struct xen_ia64_boot_param'' checker.c:126: error: invalid application of ''sizeof'' to incomplete type ''struct ia64_tr_entry'' checker.c:144: error: invalid application of ''sizeof'' to incomplete type ''struct vcpu_extra_regs'' make[1]: *** [checker] Error 1 make[1]: Leaving directory `/src1/yamahata/hg/xen/mkpatch/cross_compile/xen-unstable.hg/xen/include/public/foreign'' make: *** [build-headers] Error 2 How about the following patch? Since The first hunk of the previous patch was committed to the staging tree, this might not apply cleanly though. # HG changeset patch # User yamahata@valinux.co.jp # Date 1170210228 -32400 # Node ID 90331c4df8af3114a4eda8aab0c59b83f7ef600c # Parent 5e8da0663ff863c9de8948b72399e591f34828a2 fix cross ia64 build on x86. PATCHNAME: fix_cross_ia64_on_x86 Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> diff -r 5e8da0663ff8 -r 90331c4df8af xen/include/public/foreign/Makefile --- a/xen/include/public/foreign/Makefile Tue Jan 30 01:23:58 2007 +0000 +++ b/xen/include/public/foreign/Makefile Wed Jan 31 11:23:48 2007 +0900 @@ -13,11 +13,14 @@ clean: rm -f checker checker.c $(XEN_TARGET_ARCH).size rm -f *.pyc *.o *~ +ifeq ($(CROSS_COMPILE),) check-headers: checker -ifeq ($(CROSS_COMPILE),) ./checker > $(XEN_TARGET_ARCH).size diff -u reference.size $(XEN_TARGET_ARCH).size +checker: checker.c $(headers) + $(HOSTCC) $(CFLAGS) -o $@ $< else +check-headers: @echo "cross build: skipping check" endif @@ -30,8 +33,5 @@ ia64.h: ../arch-ia64.h ../xen.h $(script ia64.h: ../arch-ia64.h ../xen.h $(scripts) python mkheader.py $* $@ $(filter %.h,$^) -checker: checker.c $(headers) - $(HOSTCC) $(CFLAGS) -o $@ $< - checker.c: $(scripts) python mkchecker.py $(XEN_TARGET_ARCH) $@ $(architectures) -- yamahata _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Gerd Hoffmann
2007-Jan-31 11:30 UTC
Re: [Xen-devel] [PATCH] fix cross compiling ia64 on x86
Hi,> Without this hunk, checker.c doesn''t compile because checker.c is copmiled > by HOSTCC, not CC. > How about the following patch?Looks ok to me. The whole sanity check doesn''t work anyway when cross-compiling, so not trying to build it in the first place is fine. cheers, Gerd -- Gerd Hoffmann <kraxel@suse.de> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Isaku Yamahata
2007-Feb-01 02:55 UTC
[PATCH] fix corss compile ia64 build on x86 (Re: [Xen-devel] [PATCH] fix cross compiling ia64 on x86)
The previous patch doesn''t apply cleanly. Here is the updated one. On Wed, Jan 31, 2007 at 12:30:37PM +0100, Gerd Hoffmann wrote:> Hi, > > > Without this hunk, checker.c doesn''t compile because checker.c is copmiled > > by HOSTCC, not CC. > > How about the following patch? > > Looks ok to me. The whole sanity check doesn''t work anyway when > cross-compiling, so not trying to build it in the first place is fine. > > cheers, > Gerd > > -- > Gerd Hoffmann <kraxel@suse.de> > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel >-- yamahata _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel