A recent change in the ‘head’ state of FreeBSD 10 has finally done away with building GCC (GNU Compiler Collection) and libstdc++ C++ standard library by default.
FreeBSD 10 has had Clang as its default x86 compiler since months and the change to the ‘head’ state on September 6 engraves it on stone. The change note reads, “the GNU Compiler Collection and C++ standard library (libstdc++) are no longer built by default on platforms where clang is the system compiler.”
GCC is still part of the FreeBSD base system though, but the change means that the wherever Clang is the default compiler – GCC will no longer be present, including x86, x86_64/amd64 architectures. The change also indicates that instead of libstdc++ library, FreeBSD is going to use LLVM’s libc++ library. However, those who are still looking to keep GCC on their system alongside Clang can do so by “enable[ing] them with the WITH_GCC and WITH_GNUCXX options in src.conf.”
Just about a year back we had reported that FreeBSD was intending to ship the version 10.0 with Clang as the default compiler on x86 as well as amd64 bit platforms. “We intend to ship FreeBSD 10.0 with Clang as the default compiler on i386 and amd64 platforms”, the developers revealed at the time.
Since the last announcement and during this period of one year Clang has grown in functionality and has more or less gained at par status with GCC and as a C/C++ compiler. With more liberal licensing and availability as compared to GPLv3 GCC, the time is ripe for including Clang as the default compiler. Those interested in knowing what’s in store for FreeBSD 10.0 can have a peek here.