kernel 2.6.24编译错误:undefined reference to `__umoddi3'

在fedora 10中编译kernel 2.6.24,结果出现:


undefined reference to `__umoddi3'


这样的错误。在网上查是gcc版本太新的问题,2.6.24的内核太老了,2.6.3x的内核应该就没问题,解决的办法如下:

在Makefile中找到:
KBUILD_CFLAGS   := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs /
                   -fno-strict-aliasing -fno-common /
                   -Werror-implicit-function-declaration

 

增加一行,修改成:
KBUILD_CFLAGS   := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs /
                   -fno-strict-aliasing -fno-common /
                   -Werror-implicit-function-declaration /
                   -fno-tree-scev-cprop

你可能感兴趣的:(gcc,makefile,reference)