Actually, only a minor patch is needed to make the vanilla kernel compile with gcc4. I've attached a patch, it's tiny.Hi.
I'm trying to compile a vanila kernel (linux-2.6.11.12) on FC4. Unfortunately an error stops the compilation: ---- make[3]: *** [drivers/i2c/algos/i2c-algo-bit.o] Error 1 make[2]: *** [drivers/i2c/algos] Error 2 make[1]: *** [drivers/i2c] Error 2 make: *** [drivers] Error 2 ----
Patch can be applied like this: $ cd /usr/src/linux-2.6.11.12 # [or wherever your kernel dir is] $ patch -p1 < vanilla-gcc4.patch
Using gcc4 will also produce a lot more warning messages, but I've successfully compiled working kernels with it using this patch.
If you don't want to patch, you can disable the i2c-features in the kernel config, I think that should do the trick too, if you don't need it (it's commonly used by tv-tuner cards).
Øyvind. -- < Øyvind Stegard < oyvinst at ifi uio no > < http://www.oyvind.nu/ < `Lottery: A tax on people who are bad at math.'
--- linux-2.6.11/include/linux/i2c.h 2005-03-02 08:37:49.000000000 +0100 +++ linux-2.6.11-gcc4/include/linux/i2c.h 2005-06-15 02:30:38.000000000 +0200 @@ -55,7 +55,7 @@ /* Transfer num messages. */ -extern int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[],int num); +extern int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg * msg,int num); /* * Some adapter types (i.e. PCF 8584 based ones) may support slave behaviuor. @@ -194,7 +194,7 @@ to NULL. If an adapter algorithm can do SMBus access, set smbus_xfer. If set to NULL, the SMBus protocol is simulated using common I2C messages */ - int (*master_xfer)(struct i2c_adapter *adap,struct i2c_msg msgs[], + int (*master_xfer)(struct i2c_adapter *adap,struct i2c_msg *msgs, int num); int (*smbus_xfer) (struct i2c_adapter *adap, u16 addr, unsigned short flags, char read_write,