编译内核出现错误
输入:
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了