From owner-freebsd-ports@FreeBSD.ORG Fri Sep 13 13:17:59 2013 Return-Path: Delivered-To: ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 522D2D86 for ; Fri, 13 Sep 2013 13:17:59 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: from mail-we0-x233.google.com (mail-we0-x233.google.com [IPv6:2a00:1450:400c:c03::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E10E92193 for ; Fri, 13 Sep 2013 13:17:58 +0000 (UTC) Received: by mail-we0-f179.google.com with SMTP id x55so1149107wes.10 for ; Fri, 13 Sep 2013 06:17:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:subject:message-id:mime-version:content-type :content-disposition:user-agent; bh=Ju9l6fXt+Anf2VJzvM0p4LmPo45m88XNFee9NxY87bY=; b=KvCQy63e7sVlpICxeBEV5tqUv+1pbBPkzzCbKHxtSoIiY606T6zLQudyCHCy24MUfx I7OuIKT66dp2Hw1iJtEi3uQKlxcMTP21/KiV+9ZzwcVTsOcCLsqAqX4PibKx6lLMRgg0 g45zGN9AKK/yD+hAUTYoGiRigHFvwnhV+nDkYwWWyA26eR3ZJjJmqaxXdu+QT+tg5TRm i8fcFZqd4zgtth9GACaw1hoKGVXROXaWKvHAHY5JY4uvfYD/77mUpyxjgaUx7f8jyRND O8hWi+/bKiBTNzdugSBzL21tG+nHiHuTOJbyQz6VnVYtos53NVNxWnkENZPZiaCoAYXS hDMQ== X-Received: by 10.180.103.7 with SMTP id fs7mr2582802wib.42.1379078277235; Fri, 13 Sep 2013 06:17:57 -0700 (PDT) Received: from ithaqua.etoilebsd.net (ithaqua.etoilebsd.net. [37.59.37.188]) by mx.google.com with ESMTPSA id fb9sm3516464wid.7.1969.12.31.16.00.00 (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:17:56 -0700 (PDT) Sender: Baptiste Daroussin Date: Fri, 13 Sep 2013 15:17:53 +0200 From: Baptiste Daroussin To: ports@FreeBSD.org Subject: [HEADSUP][CFT] New compiler USES flag, please test, review comment Message-ID: <20130913131753.GJ33103@ithaqua.etoilebsd.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="q5r20fdKX+PFtYHw" Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Sep 2013 13:17:59 -0000 --q5r20fdKX+PFtYHw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 regards, Bapt --q5r20fdKX+PFtYHw Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlIzEIEACgkQ8kTtMUmk6EzWAgCfWdnZhlM128ZnNBYC6Zakc/kU B68AoLagYkORkH+ADcXqdHk1JA2IMHMf =j/2p -----END PGP SIGNATURE----- --q5r20fdKX+PFtYHw--