admin管理员组文章数量:1392054
Since Linux 6.13.4, I can no longer compile Linux using my optimization flags.
For Linux 6.13.2, the following command works:
make CFLAGS='-march=native -Os -ffast-math -flto -pipe' CXXFLAGS='-march=native -Os -ffast-math -flto -pipe'
Starting from Linux 6.13.6, I get the following logs:
CC /home/user/Téléchargements/linux-6.13.6/tools/objtool/libsubcmd/exec-cmd.o
exec-cmd.c:2:10: fatal error: linux/compiler.h: No such file or directory
2 | #include <linux/compiler.h>
| ^~~~~~~~~~~~~~~~~~
compilation terminated.
Edit:
solved as follows:
export KCFLAGS=" -march=native -Os -ffast-math"
export KCPPFLAGS=" -march=native -Os -ffast-math"
export KRUSTFLAGS=" -C target-cpu=native"
make
the -flto
option does not work, I assume that my previous compilation line never worked.
本文标签: How to pass compiler options during Linux kernel compilation (gt 6134)Stack Overflow
版权声明:本文标题:How to pass compiler options during Linux kernel compilation? (>= 6.13.4) - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744763798a2623911.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论