about clang and gcc on 9-RELEASE

I'm playing with clang in the eventuality to switch to it on FreeBSD. It works more or less as gcc, only little differencies in few options, nothing strange, anyways.

My question is about Standard C++ Library. It's shared by the two compilers? And if so, is there a way to use clang specific one (to rely on this page C++ status)?

Running
Code:
~/dev/cpp/clang-test> clang -print-search-dirs
programs: =/usr/bin
libraries: =/usr/bin/../lib/clang/3.0:/usr/lib
it shows the /usr/lib/clang/3.0 directory that doesn't exist. Thanks.
 
First off, make sure you are running STABLE instead of RELEASE, and are up to date (i.e. newer than r235798, though there were some modifications this week). Currently STABLE is using clang version 3.1 with minor modifications (object file modes GCC compatibility), and 3.0 can be cleaned up with make deleteold. The C++ standard library used by default remains libstdc++, shared with g++, though LLVM projects' libc++ can be used by specifying -stdlib=libc++ clang++ flag, which will probably not work at all unless you also specify -std=c++11.
 
Ah, STABLE. That means I have to build the system from source. I'm in vbox for desktop, this actually is not in my todo list, I'm dumb for certain jobs.

Most of my code compiles with clang 3.0, I still have to test some libraries but I guess they also will compile, so I definitively switch to clang. Thanks for your advices.
 
Back
Top