linux编译内核报错You are building kernel with non-retpoline compiler, please update your compiler

遇到这个问题时,你就需要升级你的gcc的版本,我的是6.8.0然后升级之后就可以编译了

如何升级请参考

https://www.cnblogs.com/chen55555/p/12396309.html

https://lore.kernel.org/patchwork/patch/1022874/

在编译前可以输入make menuconfig

因为如果不执行此操作的话在后面make编译内核的时候会提示你回答很多问题。

其他可以参考:

https://blog.csdn.net/star_xiong/article/details/17357821

https://blog.csdn.net/xuyuefei1988/article/details/8635539

原文地址:https://www.cnblogs.com/chen55555/p/12402468.html