[HEADSUP][CFT] New compiler USES flag, please test, review comment

Jerry jerry at seibercom.net
Fri Sep 13 13:33:50 UTC 2013


On Fri, 13 Sep 2013 15:17:53 +0200
Baptiste Daroussin articulated:

> Hi,
> 
> Given how old our gcc in base is and the work done on clang and
> libc++.
> 
> It is becoming complicating to make some ports properly working on
> all supported version of FreeBSD.
> 
> To help in that I would like to propose a new USES:
> compiler
> 
> http://people.freebsd.org/~bapt/compiler.mk.txt
> 
> What it does is:
> 
> USES=compiler
> 
> Will set 2 variables:
> COMPILER_TYPE to gcc or clang depending on the base compiler
> COMPILER_VERSION wish will be the 2 first digits of the compiler
> version 46 for gcc 4.6.* 33 for clang 3.3.*
> 
> USES=compiler:features
> It creates a new COMPILER_FEATURES which will gather the supported
> features of the compiler.
> 
> Features being:
> libstdc++ if the c++ compiler uses libstdc++ by default
> libc++ if the c++ compiler uses libc++ by default
> And the standard supported by the compiler:
> c89, c99, c11, gnu89, gnu99, gnu11, c++98, c++11, gnu++98, gnu++11
> 
> USES=compiler:c11
> 
> Means you need a c11 capable compiler, and if your default comiler is
> not able to do it, it will picked clang33 by default of gcc 4.6+ if
> you specify in your make.conf you do prefer gcc over clang
> 
> USES= compiler:c++11
> 
> Means you need a c++1 capable compiler but not necessary a c++ 11
> aware standard library, in that case if the base compiler is not able
> to support c++11 clang33 will be used from ports otherwise gcc 4.6+
> if you specify it in make.conf.
> 
> USES= compiler=stdc++11
> 
> You need a c++11 aware stdlibrary, if the base compiler doesn't have
> it then gcc 4.6+ will be used.
> 
> To specify you do prefer gcc over clang by default add
> FAVORITE_COMPILER=gcc in your make.conf
> 
> For all cases that does not fall into one of the above case continue
> using USE_GCC as you where doing before

Excellent idea. I was never in favor of switching to "clang" anyway. I
would have preferred that the base "gcc" was updated to the latest
stable version; however, too many people got their shorts in a bunch
and that wasn't going to happen. This sounds like a smart, well thought
out concept; therefore, it will probably be rejected.

-- 
Jerry ♔

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the Reply-To header.
__________________________________________________________________

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20130913/54d92988/attachment.sig>


More information about the freebsd-ports mailing list