xcode clang:错误:Mac OSX Mavericks 上不受支持的选项“-static-libgcc”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/19649634/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
clang: error: unsupported option '-static-libgcc' on Mac OSX Mavericks
提问by Jagan Veeraraghavan
I am trying to compile jogl from source on my Mac Mini with Mac OSX mavericks, but getting
clang: error: unsupported option '-static-libgcc' on Mac OSX MavericksI have XCode 5.0.1 (5A2053)and installed the Command line tools for OSX MavericksAny hints on how to fix this issue
我正在尝试使用 Mac OSX Mavericks 从我的 Mac Mini 上的源代码编译 jogl,但得到
clang: error: unsupported option '-static-libgcc' on Mac OSX Mavericks我有XCode 5.0.1 (5A2053)并安装了命令行工具对于 OSX Mavericks有关如何解决此问题的任何提示
回答by Carl Norum
The command called gcc
is not really GCC on Mavericks. It's just a copy of Clang:
调用的命令gcc
并不是 Mavericks 上的真正 GCC。它只是 Clang 的副本:
$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/c++/4.2.1
Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin13.0.0
Thread model: posix
That means it doesn't support GCC-only flags like -static-libgcc
. Find out what part of your build system is generating that flag and get rid of it.
这意味着它不支持 GCC-only 标志,如-static-libgcc
. 找出您的构建系统的哪一部分正在生成该标志并摆脱它。
回答by Wade Walker
You can fix this by putting this line in your gluegen.properties file (which should be in your Users/yourname directory):
您可以通过将这一行放在您的gluegen.properties 文件(应该在您的用户/您的名字目录中)来解决这个问题:
gcc.compat.compiler=clang
This tells the JOGL build system that it's using Clang. Otherwise, it thinks it's using gcc, and tries to use gcc-specific options. This fails on Mavericks because gcc is now just a link to Clang.
这告诉 JOGL 构建系统它正在使用 Clang。否则,它认为它在使用 gcc,并尝试使用 gcc 特定的选项。这在 Mavericks 上失败了,因为 gcc 现在只是到 Clang 的链接。