“-Olimit 2000” 是什么意思?抄送的意思是
我尝试使用 gcc 编译一个旧程序(由 cc 编译)。在 makefile 中有这样一行:
CFLAGS = -O2 -Olimit 2000 -w
There is no '-Olimit 2000' in gcc。我想知道它的真正含义是什么。使用 gcc 时删除此选项是否安全。
I try to compile an old program (which was compiled by cc) using gcc. In the makefile there is one line like this:
CFLAGS = -O2 -Olimit 2000 -w
There is no '-Olimit 2000' in gcc. I am wondering what does it really mean. Whether it is safe to just delete this option when using gcc.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
据我所知,只有 IRIX 的 C 编译器支持这一点。我什至找不到关于它的用途的可靠参考。由于它对 GCC 没有任何作用,因此删除它绝对是安全的。
更详细一点,它用于禁用大于“Olimit”的例程的优化。这个限制是为了让做优化的时间受到限制。如果您为 Olimit 指定 0,则意味着“无限 Olimit”并将优化每个例程。这是 MIPSpro 的手册页: http://cimss.ssec.wisc.edu/~gumley /modis/old/mips_64.pdf
As far as I can tell, this was only supported by IRIX's C compiler. I can't even find a solid reference as to what it was used for. Since it doesn't do anything with GCC, its definitely safe to remove it.
A little more detail, it was used to disable optimization on routines that were larger than the "Olimit". This limit is to make it so the amount of time doing optimization is limited. If you specify 0 for the Olimit, it means an "infinite Olimit" and will optimization every routine. Here's a man page for MIPSpro: http://cimss.ssec.wisc.edu/~gumley/modis/old/mips_64.pdf