From owner-freebsd-ports@FreeBSD.ORG Mon Mar 18 10:50:26 2013 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 5C94B1760; Mon, 18 Mar 2013 10:50:26 +0000 (UTC) (envelope-from mexas@bristol.ac.uk) Received: from dirj.bris.ac.uk (dirj.bris.ac.uk [137.222.10.78]) by mx1.freebsd.org (Postfix) with ESMTP id 238ED714; Mon, 18 Mar 2013 10:50:26 +0000 (UTC) Received: from irix.bris.ac.uk ([137.222.10.39] helo=ncs.bris.ac.uk) by dirj.bris.ac.uk with esmtp (Exim 4.72) (envelope-from ) id 1UHWsp-0004Z8-GQ; Mon, 18 Mar 2013 10:01:39 +0000 Received: from mech-cluster241.men.bris.ac.uk ([137.222.187.241]) by ncs.bris.ac.uk with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1UHWsl-0005zB-FN; Mon, 18 Mar 2013 10:01:31 +0000 Received: from mech-cluster241.men.bris.ac.uk (localhost [127.0.0.1]) by mech-cluster241.men.bris.ac.uk (8.14.6/8.14.6) with ESMTP id r2IA1Knt051469; Mon, 18 Mar 2013 10:01:22 GMT (envelope-from mexas@mech-cluster241.men.bris.ac.uk) Received: (from mexas@localhost) by mech-cluster241.men.bris.ac.uk (8.14.6/8.14.6/Submit) id r2IA1Ab1051242; Mon, 18 Mar 2013 10:01:10 GMT (envelope-from mexas) Date: Mon, 18 Mar 2013 10:01:10 GMT From: Anton Shterenlikht Message-Id: <201303181001.r2IA1Ab1051242@mech-cluster241.men.bris.ac.uk> To: bdrewery@FreeBSD.org, gerald@pfeifer.com Subject: Re: is it a good idea to overwrite GCC_DEFAULT_VERSION= in Mk/bsd.gcc.mk? In-Reply-To: X-Spam-Score: -4.8 X-Spam-Level: ---- Cc: mexas@bristol.ac.uk, freebsd-ports@freebsd.org X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: mexas@bristol.ac.uk List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Mar 2013 10:50:26 -0000 From gerald@pfeifer.com Mon Mar 18 00:32:16 2013 On Sat, 16 Mar 2013, Bryan Drewery wrote: >>> So I wonder if there are any side effects or unexpected >>> effects if I just change GCC_DEFAULT_VERSION= to e.g. 4.7? > I don't think this is working as expected. See also ports/177017 which I > believe is a bsd.gcc.mk issue and not a pkgng or portmaster issue. My > understanding is that this user want > > When I change GCC_DEFAULT_VERSION to 4.7, it now depends on the gcc47 > package, but still is using lang/gcc: You're right! In addition to setting GCC_DEFAULT_VERSION to 4.7, one also needs to adjust the following in Mk/bsd.gcc.mk: . if ${_USE_GCC} == ${GCC_DEFAULT_VERSION} _GCC_PORT:= gcc . else _GCC_PORT:= gcc${V} . endif The most correct way of doing this would be replacing the first line by . if ${_USE_GCC} == 4.6 yes, this solves my problem, thank you. However, it's not portable. When the default is no longer 4.6, but, say 4.7, then one would have to change this to 4.7, right? I understand that one should not just mess with bsd.gcc.mk at will, but would be great if only a single change was needed for situations like mine. Thank you Anton That should then do the right thing; or you could just remove everything except for _GCC_PORT:= gcc${V} Either should work. (I'd love to update GCC_DEFAULT_VERSION to 4.7 one of these days; is the cluster sufficiently recovered for a test run?) Gerald