Environment setting

Hi to everyone. How can I set my environment so I can use cc Clang instead of GCC when I'm compiling software? Thanks for helping.
 
Which FreeBSD version? Since 9.3 clang is default. CC=clang(XY) CXX=clang++(XY) CPP=clang-cpp(XY) - you can set with XY the clang version, but it is optional.
 
Which FreeBSD version? Since 9.3 clang is default. CC=clang(XY) CXX=clang++(XY) CPP=clang-cpp(XY) - you can set with XY the clang version, but it is optional.
Keep in mind that by setting your choice of default compiler in /etc/make.conf like that, your system will use it for everything including all ports. This may not be a good idea. There are a few ports that still require GCC to build and/or function correctly.
 
Why do I always got this error?
FreeBSD GCC cannot create executables.
I'm with FreeBSD 11
Thank you
 
Back
Top