GCC 4.5:“检查 C 编译器是否工作...否” CFLAGS=“-arch x86_64”时出错
我在安装 Mac OS X 10.6.4 时通过 MacPorts 编译并安装了 GCC 4.5.1。当尝试./configure软件(例如但不限于:Wine 1.3.0、libjpeg等)时,我将编译器标志设置为CFLAGS =“-arch x86_64 -m64”以确保编译后的程序将启用 64 位。但我在配置过程中遇到错误:
“正在检查 C 编译器是否工作...否”
如果我从 CFLAGS 中删除“-arch x86_64”,则不会发生这种情况。有解决办法吗?或者我错误地设置了标志?
谢谢!
I compiled and installed GCC 4.5.1 via MacPorts in my installation of Mac OS X 10.6.4. When trying to ./configure software (such as, but not limited to: Wine 1.3.0, libjpeg, etc.), I set the compiler flag to CFLAGS = "-arch x86_64 -m64" to make sure that the compiled program will be 64-bit enabled. But I got an error during configure saying:
"checking whether the C compiler works... no"
This does not occur if I remove "-arch x86_64" from CFLAGS. Is there a solution to this? Or have I set the flags incorrectly?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
-arch
是仅在 Apple 版本的 gcc 中的标志。由于您是从不是来自 Apple 的源代码构建的,因此您的新 gcc 没有该标志。检查其手册页,了解应传递什么标志以使其生成 64 位代码。-arch
is a flag only in Apple's version of gcc. Since you built from source that didn't come from Apple, your new gcc doesn't have that flag. Check its man page for what flag you should be passing to make it generate 64-bit code.