编译内核遇到的问题compiler-gcc5.h与return_address

编译内核过程中遇到两个问题:1. 缺少`linux/compiler-gcc5.h`头文件,通过从Github下载并存放于相应位置解决问题;2. `return_address`在`return_address.c`和`ftrace.h`中重复定义,通过修改`ftrace.h`中`return_address`的声明为`static inline`并注释掉`return_address.c`中的实现来解决冲突。
摘要由CSDN通过智能技术生成

问题一 

 fatal error: linux/compiler-gcc5.h: No such file or directory

缺少compiler-gcc5.h有几个解决办法办法,我在Github上下载了一个compiler-gcc5.h,并顺利把问题解决了

转存到百度云,供大家下载

https://pan.baidu.com/s/1DOu4iWFgKpwGj29jeOGr3Q

当然亦可以降低交叉编译工具版本

sudo apt install gcc-4.7-arm-linux-gnueabi

 

问题二

arch/arm/kernel/return_address.c:65:7: error: redefinition of ‘return_address’
 void *return_address(unsigned int level)
       ^
In file included from include/linux/ftrace.h:19:0,
                 from arch/arm/kernel/return_address.c:12:
/linux/hellow/6818GEC/kernel/arch/arm/include/asm/ftrace.h:48:21: note: previous definition of ‘return_address’ was here
 extern inline void *return_address(unsigned int level)

*********************************

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值