Setting basic compiler

sossego

Retired from the forums
[file said:
/usr/ports/UPDATING:8-16]20131008:
AFFECT: all users
AUTHOR: bapt@FreeBSD.org

A new USES has been added: compiler.mk, this uses allows porters to
select a compiler for a given port based on the features the port needs
By default this will always try to find clang > 3.3.
If the user prefers using gcc then the following macro should be added
to user's make.conf: FAVORITE_COMPILER=gcc

Default version of /usr/bin/clang is 3.3 with 3.4 existing in /usr/ports/lang/clang-devel. What would be the proper value?
 
Is your aim to use the latest and most shiny clang, and is that the reason you want to set clang 3.4 as default? A bit perverted, but I think it can be done by setting in the relevant (host vs Poudriere) make.conf:
Code:
FAVORITE_COMPILER=clang
COMPILER_VERSION= 3.4
See /usr/ports/Mk/Uses/compiler.mk
 
sossego said:
Default version of /usr/bin/clang is 3.3 with 3.4 existing in /usr/ports/lang/clang-devel. What would be the proper value?
I see what you're aiming at here. That description basically says that it will always try to use Clang 3.4, which is a bit off in my opinion. Nicely spotted!

At first I'd say the proper value here would be to install lang/clang and not mess with the development version on a production system (which is also what I did on my system).

But just to be sure I checked the Makefile of lang/clang and guess what?

Code:
DEPRECATED=     Migrate to devel/clang32 or newer
EXPIRATION_DATE=        2013-11-04
So my suggestion as to the 'proper' way would be to install lang/clang33 and leave the FAVOURITE_COMPILER out of your make.conf since clang will be preferred by default anyway.
 
Back
Top