To view parent comment, click here.
To read all comments associated with this story, please click here.
Still, hopefully being default in BSD gives some incentive for clang to become as complete as GCC.
As I understand it, BSD is written in C, so other applications that can't be compiled with Clang can use GCC.
All things are not equal. clang is replacing the version of gcc in the base system, which is version 4.2.1 (plus a few patches). gcc 4.2.1 does not have openmp support, and it is missing knowledge about newer cpus.
From a practical standpoint, FreeBSD cannot adopt newer versions of gcc because of the GPLv3 unless FreeBSD wants to alienate the commercial vendors that base their products on FreeBSD and who contribute back to the project.
This is a line of reasoning that I just don't understand.
The "base compiler" is used ... to compile the "base OS". The only features the "base compiler" needs to have are those that allow it to ... compile the "base OS". Thus, whether or not Clang/LLVM support OpenMP, every since C++ extension/feature, etc is moot and completely orthogonal to its uses as the "base compiler".
If you need OpenMP support, install the latest version of GCC from the ports tree, and use that for your OpenMP-using projects.
If you need specific C++ features, install the latest version of "Compiler X" from the ports tree, and use that for your C++ projects.
And so on.
If the "base compiler" supports everything you need in your projects, great. Use it. If not, there are many, many, many different compilers in the ports tree. Pick the one that suits your needs, and carry on.




Member since:
2007-07-20
Sure, but all things equal - why would you switch if clang misses OpenMP and can't compile some C++ apps (inkscape for example fails, and some areas need non-trivial re-working to make it compatible).
Still, hopefully being default in BSD gives some incentive for clang to become as complete as GCC.