当前位置: 技术问答>linux和unix
Linux 内核的编译与配置
来源: 互联网 发布时间:2017-04-17
本文导语: [root@cfc linux-2.6.34.14]# make bzImage HOSTLD scripts/kconfig/conf scripts/kconfig/conf -s arch/x86/Kconfig CHK include/linux/version.h UPD include/linux/version.h CHK include/generated/utsrelease.h UPD include/generate...
[root@cfc linux-2.6.34.14]# make bzImage
HOSTLD scripts/kconfig/conf
scripts/kconfig/conf -s arch/x86/Kconfig
CHK include/linux/version.h
UPD include/linux/version.h
CHK include/generated/utsrelease.h
UPD include/generated/utsrelease.h
CC kernel/bounds.s
在包含自 include/linux/compiler-gcc.h:91 的文件中,
从 include/linux/compiler.h:42,
从 include/linux/stddef.h:4,
从 include/linux/posix_types.h:4,
从 include/linux/types.h:14,
从 include/linux/page-flags.h:8,
从 kernel/bounds.c:9:
include/linux/compiler-gcc4.h:8:4: 错误:#error Your version of gcc miscompiles the __weak directive
make[1]: *** [kernel/bounds.s] 错误 1
make: *** [prepare0] 错误 2
不知道该怎么往下做了
HOSTLD scripts/kconfig/conf
scripts/kconfig/conf -s arch/x86/Kconfig
CHK include/linux/version.h
UPD include/linux/version.h
CHK include/generated/utsrelease.h
UPD include/generated/utsrelease.h
CC kernel/bounds.s
在包含自 include/linux/compiler-gcc.h:91 的文件中,
从 include/linux/compiler.h:42,
从 include/linux/stddef.h:4,
从 include/linux/posix_types.h:4,
从 include/linux/types.h:14,
从 include/linux/page-flags.h:8,
从 kernel/bounds.c:9:
include/linux/compiler-gcc4.h:8:4: 错误:#error Your version of gcc miscompiles the __weak directive
make[1]: *** [kernel/bounds.s] 错误 1
make: *** [prepare0] 错误 2
不知道该怎么往下做了
|
错误提示的很清楚了,楼主的gcc版本与内核不匹配
|
楼主看看自己Linux内核的版本是不是比正在编译的内核的版本低
|
ubuntu执行下面指令,安装一下
apt-get install gcc
如果安装过了,就更新一下
apt-get update
fedora/centos 使用yum update
然后再编译试试
apt-get install gcc
如果安装过了,就更新一下
apt-get update
fedora/centos 使用yum update
然后再编译试试