默认 GCC 架构
当没有显式指定-arch
选项时,GCC将针对哪种架构进行编译?我可以依赖它作为机器的本机架构吗?
When the -arch
option is not explicitly specified, which architecture will GCC compile for? Can I rely on it being the machine's native architecture?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,GCC 默认情况下会编译为本机架构。至少这是“默认”行为。
因此,如果您使用默认安装(作为发行版的一部分或通过其包管理器),您可以非常确定 GCC 会“做正确的事情”。
Yes, GCC will, by default, compile to the native architecture. At least this is the 'default' behavior.
So, if you're using a default install (either as part of your distro or via its package manager) you can be pretty sure GCC will "do the right thing."