高版本gcc编译低版本内核

Ubuntu18.04安装arm-linux-gnueabi-gcc,版本为7.5.0,编译4.0.0 Linux内核时出现

linux/compiler-gcc7.h: No such file or directory

临时解决方法:

find "linux/compiler-gcc*.h" in your project, "*" maybe 3 or 5 or others

cp "linux/compiler-gcc*.h" "linux/compiler-gcc7.h".

 

参考:

https://askubuntu.com/questions/1157084/fatal-error-linux-compiler-gcc7-h-no-such-file-or-directory#:~:text=include/linux/compiler-gcc.h:121:1:%20fatal%20error:%20linux/compiler-gcc7.h,%20this%20basically

posted @ 2024-10-06 21:09  Fumian  阅读(22)  评论(0编辑  收藏  举报