Linux编译产生警告,造成的编译失败处理办法

10 篇文章 0 订阅

Linux编译选项

[ ] Compile the kernel with warnings as errors

This option refers to a setting in the kernel compilation process that determines how the compiler should handle warnings.

If the option is unchecked and warnings are generated during the compilation process, the compiler will still proceed to generate the kernel image.

If the option is checked and warnings are generated during the compilation process, the compiler will treat the warnings as errors and stop the compilation process. This is useful for ensuring that the kernel code is free from any warning messages, which could indicate potential issues or bugs in the code.

Enabling this option can help to improve the quality and stability of the kernel code, but it may also result in longer compilation times and require more effort to resolve any warning messages that are generated.

这个选项是指内核编译过程中的一个设置,它决定了编译器应该如何处理警告。

如果该选项未被选中并且在编译过程中产生了警告,编译器仍然会继续生成内核映像。

如果勾选了该选项,编译过程中产生了警告,编译器会将警告视为错误并停止编译过程。 这对于确保内核代码没有任何警告消息很有用,警告消息可能表明代码中存在潜在问题或错误。

启用此选项有助于提高内核代码的质量和稳定性,但也可能会导致编译时间变长,并且需要付出更多努力来解决生成的任何警告消息。

解决办法:

  1. 通过make menuconfig进行去除勾选
  2. 在.config文件中将该编译选项设置为“n”
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

What’smean

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值