Skip to contentSkip to conversation

FYI: 2.6.11 XenLinux has issues with x86-64 ia32 emulation compilation on gcc4

DISCUSSION Jerone Young 2 participants 2 messages Jun 27, 2005

lore
Share & tools
lore
#0 lore raw

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.

Signature · 4 lines
Jerone Young
IBM Linux Technology Center
[email protected]
512-838-1157 (T/L: 678-1157)
#1 lore raw
Quoted 4 lines · Jerone Young

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.

This will be a while. We want to substantially merge xen/i386 and xen/x86_64 before undertaking the upgrade.

-- Keir