OS X 10.9 gcc链接到clang [英] OS X 10.9 gcc links to clang

查看:154
本文介绍了OS X 10.9 gcc链接到clang的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚注意到,在安装OS X 10.9之后,g ++编译器链接到了clang编译器。有没有办法恢复到gcc / g ++?

I just noticed that after installing OS X 10.9, the g++ compiler links to the clang compiler. Is there anyway to revert back to gcc/g++?

推荐答案

长久以来这种方式已经存在了。 10.8带来的GCC实际上是GCC前端,带有LLVM后端。

It has been this way for a long time already. The "GCC" that came with 10.8 was really GCC front-end with LLVM back-end.

获得GCC的最佳方式是通过自制软件。在链接页面底部的one-line homebrew install命令之后,您只需要:

The best way to get GCC is via Homebrew. After the one-line homebrew install command on the bottom of the linked page, you just need:

$ brew install gcc49

与macports不同,Homebrew不会混淆您的系统目录,并且它更好地管理版本和卸载。它也不需要称为 sudo 的拐杖。

Unlike macports, Homebrew doesn't clutter your system dirs and it's much better at managing versions and uninstalls. It also doesn't require the crutch known as sudo.

这篇关于OS X 10.9 gcc链接到clang的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆