![使用非 retpoline 编译器构建内核](https://linux22.com/image/911984/%E4%BD%BF%E7%94%A8%E9%9D%9E%20retpoline%20%E7%BC%96%E8%AF%91%E5%99%A8%E6%9E%84%E5%BB%BA%E5%86%85%E6%A0%B8.png)
我正在尝试在 Ubuntu 上构建 rtl wifi 驱动程序,当我使用make
命令时,它会给我这个消息
make[1]: Entering directory '/usr/src/linux-headers-4.15.0-50-generic'
arch/x86/Makefile:156: CONFIG_X86_X32 enabled but no binutils support
arch/x86/Makefile:245: *** You are building kernel with non-retpoline compiler, please update your compiler.. Stop.
make[1]: Leaving directory '/usr/src/linux-headers-4.15.0-50-generic'
Makefile:58: recipe for target 'all' failed
make: *** [all] Error 2
答案1
改变配置_RETPOLINE到 n.
运行make menuconfig
。导航到Processor type and features
,然后取消选中Avoid speculative indirect branches in kernel
。
请注意,您的内核可能会遭受内核到用户的数据泄露。
答案2
你试过了吗
sudo make
代替make
?
make
给了我那个 retpoline 错误。没有出现指令sudo make
。