编译linux.2.6.22内核 出现错误提示"dwarf2"

编译内核出现错误

输入:
make uImage
出现错误提示: cc1: error: unrecognised debug output level “dwarf2”

[root@localhost linux-2.6.22.6]# make bzImage
CHK include/linux/version.h
make[1]: `include/asm-arm/mach-types.h’ is up to date.
CHK include/linux/utsrelease.h
CALL scripts/checksyscalls.sh
:91:1: warning: “__IGNORE_sync_file_range” redefined
In file included from :2:
include/asm/unistd.h:444:1: warning: this is the location of the previous definition
:1097:2: warning: #warning syscall fadvise64 not implemented
:1265:2: warning: #warning syscall migrate_pages not implemented
:1321:2: warning: #warning syscall pselect6 not implemented
:1325:2: warning: #warning syscall ppoll not implemented
:1365:2: warning: #warning syscall epoll_pwait not implemented
CHK include/linux/compile.h
AS usr/initramfs_data.o
cc1: error: unrecognised debug output level “dwarf2”
make[1]: *** [usr/initramfs_data.o] Error 1
make: *** [usr] Error 2

(1)解决方法1:

网上搜了下,是GCC版本不支持-gdwarf2
打开Makefile发下有这个参数

ifdef CONFIG_DEBUG_INFO
CFLAGS += -g
AFLAGS += -gdwarf2
endif

复制代码讲参数去掉后即可
#ifdef CONFIG_DEBUG_INFO
#CFLAGS += -g
#AFLAGS += -gdwarf2
#endif

(2)解决方法2:GCC版本太老了。

GCC的版本太老了,你的gcc太老了,这年头使用的debug info格式都是gdwarf2了

  • 2
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值