原文地址:https://blog.csdn.net/u014134262/article/details/50402928
今天编译kernel 的时候,报error: unrecognized command line option '-fstack-protector-strong'的错误!
这是这么fstack-protector-strong,搜了一圈也不大明白什么意思,不过最后是解决了。
解决办法:
在kernel目录下:
make menuconfig
在 General setup——
Optimize very unlikely/likely branches 把该项在编译该项中去掉。如下图:
或者把子选项Stack Protector buffer overflow detection 设置为None。
上面解决我的问题,估计其他人的问题未必就能解决。
下边记录一下网上找到的一些有用的解决办法:
1、Turns out that the ‘-fstack-protector-strong’ option was not added to the GCC compiler until version 4.9. Upgraded my GCC to the latest available fixed the issue.
2、http://www.gossamer-threads.com/lists/gentoo/user/292834
关于-fstack-protector-strong详细说明的英文网站:
https://securityblog.redhat.com/tag/stack-protector/
http://outflux.net/blog/archives/2014/01/27/fstack-protector-strong/