From owner-freebsd-toolchain@FreeBSD.ORG Mon Sep 17 19:10:31 2012 Return-Path: Delivered-To: toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 69BD51065676 for ; Mon, 17 Sep 2012 19:10:31 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (lor.one-eyed-alien.net [69.66.77.232]) by mx1.freebsd.org (Postfix) with ESMTP id 1931B8FC16 for ; Mon, 17 Sep 2012 19:10:29 +0000 (UTC) Received: from lor.one-eyed-alien.net (localhost [127.0.0.1]) by lor.one-eyed-alien.net (8.14.5/8.14.5) with ESMTP id q8HJAS2g043397 for ; Mon, 17 Sep 2012 14:10:28 -0500 (CDT) (envelope-from brooks@lor.one-eyed-alien.net) Received: (from brooks@localhost) by lor.one-eyed-alien.net (8.14.5/8.14.5/Submit) id q8HJASaQ043396 for toolchain@freebsd.org; Mon, 17 Sep 2012 14:10:28 -0500 (CDT) (envelope-from brooks) Date: Mon, 17 Sep 2012 14:10:28 -0500 From: Brooks Davis To: toolchain@freebsd.org Message-ID: <20120917191028.GA42648@lor.one-eyed-alien.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="HlL+5n6rz5pIUxbD" Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Subject: enabling libc++ by default when building with clang X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Sep 2012 19:10:31 -0000 --HlL+5n6rz5pIUxbD Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Now that we have the COMPILER_TYPE variable I'm following up on an idea by theraven@ that we should enable libc++ by default when we are building world with a compiler that supports it. The following patch implements this: http://people.freebsd.org/~brooks/patches/libc%2b%2b-default.diff One key question is, when do we want to throw this switch? Do we do it now so people using clang start using it sooner or do we wait until we've switched the default compiler and things have settled a bit? I suspect that we'll want to wait, but I'm curious what others think. -- Brooks Index: share/mk/bsd.own.mk =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- share/mk/bsd.own.mk (revision 240466) +++ share/mk/bsd.own.mk (working copy) @@ -432,7 +432,6 @@ ICONV \ IDEA \ INSTALL_AS_USER \ - LIBCPLUSPLUS \ NAND \ OFED \ SHARED_TOOLCHAIN @@ -642,6 +641,33 @@ .endif .endfor =20 +# +# MK_* options that default to on if the compiler is clang. +# +.include +.for var in \ + LIBCPLUSPLUS +.if defined(WITH_${var}) && defined(WITHOUT_${var}) +.error WITH_${var} and WITHOUT_${var} can't both be set. +.endif +.if defined(MK_${var}) +.error MK_${var} can't be set by a user. +.endif +.if ${COMPILER_TYPE} =3D=3D "clang" +.if defined(WITHOUT_${var}) +MK_${var}:=3D no +.else +MK_${var}:=3D yes +.endif +.else +.if defined(WITH_${var}) +MK_${var}:=3D yes +.else +MK_${var}:=3D no +.endif +.endif +.endfor + .if ${MK_CTF} !=3D "no" CTFCONVERT_CMD=3D ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .elif defined(MAKE_VERSION) && ${MAKE_VERSION} >=3D 5201111300 --HlL+5n6rz5pIUxbD Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iD8DBQFQV3WjXY6L6fI4GtQRApOqAKDMVpYdYwjkX3iYivS73til16fcagCgrVEa j+wOQvFMBzqdXaoyQdo/0qk= =H+Ke -----END PGP SIGNATURE----- --HlL+5n6rz5pIUxbD--