Is CLANG to be so much recommended for FreeBSD ?

Sorry, I did several recompiles of clang from git and it was no problem. Also, clang seems to run faster than gcc, but I did not benchmark that.
 
GCC is of course a good quality compiler since it drives many systems. It is kinda producing bloat, ok, takes ages to compile,... and more more to say. It is ok but not perfect (like everything).

On the other hands, have you ever tried to compile CLANG for your system? Good luck really. It is really difficult to manage to compile it.
https://github.com/llvm-mirror/clang

There is maybe an urgent need for a base C-compiler for *BSD operating systems (core/base system).
Oh Dear, are you a Linux troll?

Why not simply pkg install llvm60?

Or in case you are not faint-hearted, pkg install clang-devel, or even cd /usr/ports/devel/clang-devel; make install clean

If you really need to build and install Clang directly from the upstream sources, then of course it would be difficult, if you don't read the proper documentation, but only give indirect links to it for others reading it for you. Building and using Clang: http://clang.llvm.org/get_started.html

I read it long time ago, because I was in need to compile lldb(1) on my BeagleBone Black, since this didn't made it into the ports for ARM targets, here come my installation minutes:
Code:
# Installation of the build dependencies:
pkg install tmux
pkg install cmake
pkg install python
pkg install libxml2
pkg install swig30
pkg install ninja

mkdir -p ~/install; cd ~/install
svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm
cd ~/install/llvm/tools
svn co http://llvm.org/svn/llvm-project/cfe/trunk clang
svn co http://llvm.org/svn/llvm-project/lld/trunk lld
svn co http://llvm.org/svn/llvm-project/lldb/trunk lldb
cd ~/install/llvm/projects
svn co http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
svn co http://llvm.org/svn/llvm-project/libunwind/trunk libunwind
svn co http://llvm.org/svn/llvm-project/libcxx/trunk libcxx
svn co http://llvm.org/svn/llvm-project/libcxxabi/trunk libcxxabi


# Preparing the build system:
cd ~/install/llvm
mkdir build; cd build

# EITHER
   # On a fast system with plenty of RAM, execute:
   cmake -G Ninja ..

#OR
   # ON a ARM machine with tiny resources in all respects, execute:
cmake -DLLVM_TARGETS_TO_BUILD="ARM" -DCMAKE_BUILD_TYPE=MinSizeRel -DLLVM_PARALLEL_COMPILE_JOBS="1" -DLLVM_PARALLEL_LINK_JOBS="1" -G Ninja ..


# Building -- using tmux, so we may disconnect during the long build
tmux new "ninja install"
<ctrl>-b d

# Check the progress
tmux a
<ctrl>-b d

# Some hours later
/usr/local/bin/clang --version
 
The BSD license in itself makes it better. GNU licenses encourage recycling bloat (inefficiencies/ bugs), because no one wants to give up their contributions the competitor who owns the copyright for one piece of software, then not be able to keep the next improvement for themselves. It makes the solution, use a lot of software to get 1 needed piece of code, because allows someone to patch the problem, so they don't have to use their heavy time and resources to benefit the owner of the copyright, more than the open source community. Then, no one can make the next improvement, without giving up their rights to that. With a BSD or MIT license, someone can improve it, and it benefits everyone, then some GNU licenses can absorb that improvement too.

Clang may not work with everything yet, but its improvement curve is being much faster than GCC.

GCC is of course a good quality compiler since it drives many systems.
No, it's not, but there's quality code hidden in it.

If FreeBSD stuck with GCC, by its newer license we would be forced to use their bloat. By them moving up the license, FreeBSD, would either have to stick with the older GCC, which can only go so far, being forced to use that old license, or further be controlled by GCC, and not be able to have as many freedoms for software compiled on it. Any benefit put forward to GCC would be lost for them to own. That will slow down and harm the project, for FreeBSD users to do what they want, or use their hard work to improve the system, not lose that work, so they can't make the next benefit.

I don't even want to hear about GCC anymore. The topic of this thread is about GCC, not what else is there other than Clang (that's not GCC).
 
Back
Top