当我启动 g++ 时,我看到很多默认标志:-mtune=generic -march=x86-64 -fasynchronous-unwind-tables -fstack-protector-strong -fstack-clash-protection -fcf-protection
。
有谁知道如何取消设置-fstack-protector-strong
吗?
谢谢!
您可以使用以下命令撤消该选项
\n-fno-stack-protector\n
Run Code Online (Sandbox Code Playgroud)\n或者
\n-fstack-protector\n
Run Code Online (Sandbox Code Playgroud)\n如果您只想要基本的保护。
\n参考: https: //gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html
\n更新:
\n该选项-fno-stack-protector
确实没有明确记录。它是 gcc 通用选项处理的一部分。正如一般选项文档所述:
\n\n许多选项的名称都以
\n-f\' or with
-W\'\xe2\x80\x94 开头,例如 -fforce-mem、-fstrength-reduce、-Wformat 等。其中大多数都有积极和消极的形式;-ffoo 的否定形式是 -fno-foo。本手册仅记录这两种形式中的一种,以非默认形式为准。
归档时间: |
|
查看次数: |
169 次 |
最近记录: |