FreeBSD 将会抛弃 gcc, 转而使用Apple的LLVM/Clang 。
来源:互联网 发布:wifi信道检测软件 编辑:程序博客网 时间:2024/04/28 01:31
FreeBSD 10 To Use Clang Compiler, Deprecate GCC
Posted by Michael Larabel on May 12, 2012
As indicated by the Q1-2012 FreeBSD Status Report, LLVM'sClang compiler is quickly replacing GCC for this popular BSD operating system.The developers are also making much progress in a GNU-free C++11 stack. ForFreeBSD 10 they're aiming for Clang as the default C/C++ compiler, deprecateGCC, and to have a BSD-licensed C++ stack.
While the Q1-2012 FreeBSD Status Report was just talked about in theafore-linked article, the Clang and C++ items warranted their own more detailedarticle.
Going back to 2009, FreeBSD developers have worked to replace GCC withLLVM/Clang. Over time, there's been numerous improvements especially with the FreeBSD 9.0 release. The FreeBSDdevelopers are interested in doing away with the GPL-licensed GNU CompilerCollection and instead use the Apple-sponsored LLVM/Clang work that's under aBSD-like license.
As reported in the status report for the last quarter, Clang 3.0 is nowinstalled by default for FreeBSD 10.0-CURRENT and 9.0-STABLE. They're alsoworking to import a newer Clang snapshot since LLVM 3.1 and Clang 3.1 are about to be released (next week). OnFreeBSD 10.0-CURRENT, Clang can now build world and the generic FreeBSD kernelwithout emitting any error warnings. With more recent revisions, a new WITH_CLANG_IS_CC optionwill make Clang become the default cc, c++, and cpp commands.
The intent is to make Clang become the default compiler for FreeBSD 10.0 and tothen deprecate GCC from FreeBSD. "The intent is to switch on this optionby default rather sooner than later, so we can start preparing for shipping10.0-RELEASE with Clang as as the default system compiler, and deprecating gcc."
Additional information on building FreeBSD with Clang is available from this FreeBSD.org Wiki page. Any FreeBSD package notbuilding under Clang should be treated as a bug; "One of the most importanttasks at the moment is to actually build and run your entire FreeBSD systemwith Clang, as much as possible. Any compile-time or run-time problems shouldbe reported to the appropriate mailing list, or filed as a PR. If you havepatches and/or workarounds, that would be even better."
There's also been other non-Apple operating systems toying with Clang fordifferent use-cases. There was also the Debian Clang experiment, which could buildmost of the Debian packages for popular architectures, but LLVM/Clang stillfalls behind in its support of the more obscure CPU architectures and platformscompared to GCC. Some vendors have also been playing around with the idea of usingClang to build the Linux kernel (it's possible to do withcertain kernel configurations, patches, and other headaches).
LLVM/Clang is unlikely to replace GCC on any tier-one Linux distribution as thedefault in the foreseeable future, but it's interesting as a complementaryoption. Clang is quite good with its static analysis abilities, among other benefits.
In terms of FreeBSD's mission for a GNU-free C++11 stack, the libc++ andlibcxxrt libraries have gained new features, support for the ARM EABI, and withClang 3.1 can now pass all C++11 atomic tests. The libcxxrt library is the new C++ run-time that was given by PathScale.There's still some work ahead in this area, but the status report mentions,"we're on track for a BSD licensed C++ stack in 10.0."
Discuss this article in our forums, IRCchannel, or email the author. You can also follow ourcontent via RSS and on social networks like Facebook, Identi.ca,and Twitter (@Phoronix and@MichaelLarabel).Subscribe to Phoronix Premium to view our contentwithout advertisements, view entire articles on a single page, and experienceother benefits.
- FreeBSD 将会抛弃 gcc, 转而使用Apple的LLVM/Clang 。
- Why is FreeBSD deprecating GCC in favor of Clang/LLVM?
- LLVM及Clang、llvm-gcc
- LLVM及Clang、llvm-gcc
- clang、gcc、LLVM
- Apple LLVM compiler 4.2 与LLVM GCC的区别
- GCC,LLVM,Clang编译器对比
- 编译器(GNU & GCC & clang & llvm)
- GCC,LLVM,Clang编译器对比
- Clang、LLVM与GCC介绍
- 编译器(GNU & GCC & clang & llvm)
- 编译器(GNU & GCC & clang & llvm)
- GCC,LLVM,Clang编译器对比
- GCC,LLVM,Clang编译器对比
- 编译器(GNU & GCC & clang & llvm)
- llvm-clang和llvm-gcc
- llvm+clang的安装(使用cmake)
- Clang/LLVM使用
- 【Transact-SQL】统计某字段中的值第一次出现后的2小时内出现的次数
- 架设samba服务器
- 回味无穷的一句话
- DedeCMS中修改模板:让页面中显示各栏目的内容列表
- ubuntu下ATI/Intel显卡安装及双显卡切换的方法
- FreeBSD 将会抛弃 gcc, 转而使用Apple的LLVM/Clang 。
- eclipse 下代码自动提示及空格 = 自动上屏的问题
- 分析各家2440开发板的性价比(初学者如何选择开发板)
- 一个很好的HttpHelper类 C# ASP.NET
- 上海斗地主攻略超级系列5——概率(下)
- Java接口
- 总结
- java ee的13种技术
- Python进阶(二)——Python对象类型