Project

General

Profile

Actions

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.

Status:
Open
Priority:
Normal
Assignee:
-
Category:
Infrastructure
Start date:
04/05/2011
Due date:
% Done:

0%

Estimated time:
Detected in build:
svn
Platform:
Published in build:

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

qib_iba7322.c.p.ma (1.32 MB) qib_iba7322.c.p.ma Preprocessed sources of noncompilable driver Evgeny Novikov, 05/24/2011 11:14 AM

Related issues 1 (0 open1 closed)

Related to C Instrumentation Framework - Bug #1166: GCC-aspectator fails with fatal error: incorrect exceptional codeClosedEvgeny Novikov05/03/2011

Actions
Actions #1

Updated by Pavel Shved over 13 years ago

We should patch kernels, I guess. We can't allow any further restriction on the age of kernels we support.

Actions #2

Updated by Evgeny Novikov over 13 years ago

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]

Actions #3

Updated by Evgeny Novikov over 13 years ago

  • 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.

Actions #4

Updated by Evgeny Novikov over 13 years ago

  • 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.

Actions #5

Updated by Evgeny Novikov over 13 years ago

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.

Actions

Also available in: Atom PDF