Bug #1036
open
gcc 4.6.0 doesn't support full kernel build
Added by Evgeny Novikov over 13 years ago.
Updated over 13 years ago.
Description
I try gcc 4.6.0 on the old 2.6.31.6 but even 2.6.38 contains the given problem:
In file included from drivers/net/igbvf/ethtool.c:36:0:
drivers/net/igbvf/igbvf.h: At top level:
drivers/net/igbvf/igbvf.h:128:15: error: duplicate member ‘page’
make[3]: *** [drivers/net/igbvf/ethtool.o] Error 1
make[2]: *** [drivers/net/igbvf] Error 2
make[1]: *** [drivers/net] Error 2
make: *** [drivers] Error 2
Corresponding official note is so
http://kerneltrap.org/mailarchive/linux-netdev/2010/10/18/6287514.
I suggest that we should turn off this error in gcc internally. Another way is to do all kernels correct by means of a special patch (the latter even can be found in last kernels).
Files
We should patch kernels, I guess. We can't allow any further restriction on the age of kernels we support.
In fact this is the only problem during 2.6.31.6 kernel build by means of gcc 4.6.0. After simple hand renaming of the second field page
the kernel was built.
However, there is a lot of warning messages like following:
In file included from include/linux/irq.h:29:0,
from /home/joker/work/14_driver/big_launch/linux-2.6.31.6/arch/x86/include/asm/hardirq.h:5,
from include/linux/hardirq.h:10,
from include/linux/interrupt.h:12,
from include/linux/netdevice.h:1058,
from include/net/sock.h:50,
from lib/kobject_uevent.c:25:
/home/joker/work/14_driver/big_launch/linux-2.6.31.6/arch/x86/include/asm/irq_regs.h: In function ‘set_irq_regs’:
/home/joker/work/14_driver/big_launch/linux-2.6.31.6/arch/x86/include/asm/irq_regs.h:26:2: warning: variable ‘tmp__’ set but not used [-Wunused-but-set-variable]
- Category changed from 15 to Infrastructure
- Assignee deleted (
Evgeny Novikov)
Kernel patch should be tuned a bit to allow gcc 4.6.0 to build old (rather new) kernels.
- Status changed from New to Open
- Priority changed from High to Normal
Kernel drivers are successfully checked with aspectator based on gcc 4.6.0.
Since we aren't going in near future to use this gcc to build kernels I lower its priority.
On investigating #1166 issue I found that one driver of linux-2.6.37 drivers/infiniband/hw/qib/qib_iba7322.c isn't compilable with gcc 4.6.0:
drivers/infiniband/hw/qib/qib_iba7322.c.p:1333:3: error: initializer element is not constant
drivers/infiniband/hw/qib/qib_iba7322.c.p:1333:3: error: (near initialization for 'ibhdr.lrh[2]')
I attach preprocessed sources of the given driver so one can see them.
The issue isn't important still since there is just few drivers that aren't compilable.
Also available in: Atom
PDF