[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] FYI: 2.6.11 XenLinux has issues with x86-64 ia32 emulation compilation on gcc4



Since IA32 emulation is on by default in the compilation (and it should
be) building the latest x86-64 2.6.11 Xenlinux in the Xen tree with
GCC4:

  SYSCALL arch/xen/x86_64/ia32/vsyscall-syscall.so
  CC      arch/xen/x86_64/ia32/syscall32.o
  CC      arch/xen/x86_64/ia32/sys_ia32.o
  CC      arch/xen/x86_64/ia32/ia32_ioctl.o
In file included from fs/compat_ioctl.c:69,
                 from arch/xen/x86_64/ia32/ia32_ioctl.c:14:
include/linux/i2c.h:58: error: array type has incomplete element type
include/linux/i2c.h:197: error: array type has incomplete element type
make[4]: *** [arch/xen/x86_64/ia32/ia32_ioctl.o] Error 1
make[3]: *** [arch/xen/x86_64/ia32] Error 2
make[3]: Leaving directory `/xen/xen-unstable/linux-2.6.11-xen0'
make[2]: *** [build] Error 2
make[2]: Leaving directory `/xen/xen-unstable'
make[1]: *** [linux-2.6-xen0-build] Error 2
make[1]: Leaving directory `/xen/xen-unstable
make: *** [kernels] Error 1


This is caused by an issue in include/linux/i2c.h in 2.6.11 where you
have:

Line 58: 
extern int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg
msg[],int num);

Line 197:

int (*master_xfer)(struct i2c_adapter *adap,struct i2c_msg msgs[],
                           int num);

Both want to take in "struct i2c_msg msgs[]" and gcc4 doesn't like this.
The fix for this is to not look for an array of and use a pointer. Well
looking at the Linux 2.6.12 code they changed the code base to do this:

Line 58:
extern int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg *msgs,
int num);

Line 194:
int (*master_xfer)(struct i2c_adapter *adap,struct i2c_msg *msgs,
                           int num);


Not sure if this is gcc4 specific..but since no one has reported the
build breaking I think it is. From what I see the fix to this is to turn
off ia32 emulation if you are using gcc4, or hack up fs/ otherwise wait
till 2.6.11 Xenlinux gets an upgrade to 2.6.12.


-- 
Jerone Young
IBM Linux Technology Center
jyoung5@xxxxxxxxxx
512-838-1157 (T/L: 678-1157)


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.