From owner-freebsd-ports@FreeBSD.ORG Sun Jul 29 23:55:24 2012 Return-Path: Delivered-To: freebsd-ports@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0CD23106566C for ; Sun, 29 Jul 2012 23:55:24 +0000 (UTC) (envelope-from gerald@pfeifer.com) Received: from ainaz.pair.com (ainaz.pair.com [209.68.2.66]) by mx1.freebsd.org (Postfix) with ESMTP id DCB3D8FC0C for ; Sun, 29 Jul 2012 23:55:23 +0000 (UTC) Received: from [192.168.0.129] (vie-188-118-248-247.dsl.sil.at [188.118.248.247]) by ainaz.pair.com (Postfix) with ESMTPSA id 37D963F412; Sun, 29 Jul 2012 19:55:20 -0400 (EDT) Date: Mon, 30 Jul 2012 01:55:17 +0200 (CEST) From: Gerald Pfeifer To: Brendan Fabeny , Kevin Oberman In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII Cc: freebsd-ports@FreeBSD.org Subject: Re: lang/gcc46 X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jul 2012 23:55:24 -0000 On Tue, 13 Dec 2011, b. f. wrote: >> Ahh. I see the issue. I have not looked at bsd.gcc.mk, but it does not >> seem like this should be too difficult. Just a matter of the right >> person having the time. Would ports specifying gcc46 need to be >> touched? > Gerald had planned to do this after the ports tree had been completely > unfrozen. It is likely that only a few dependent ports will have to be > changed. You can make this change now, simply by removing lang/gcc46 > and installing lang/gcc, and then rebuilding all dependent ports (this > last step may not be necessary in many cases, but it is better to be > safe). lang/gcc and lang/gcc46 should be fully compatible, without rebuilds necessary. Only when lang/gcc is going to move to GCC 4.7 later this year would I consider that. > Or you can try something like the attached patch, which will fix the > dependency accounting -- but you will then have to replace > _GCC_BUILD_DEPENDS with _GCC_PORT_DEPENDS (the latter will then be a > misnomer) in math/atlas, math/atlas-devel, math/gotoblas, math/R, > net-p2p/eiskaltdcpp-* (and soon perhaps also lang/libobjc2, if it is > altered to use USE_GCC, which seems likely). Sadly there are a number of ports using _GCC_BUILD_DEPENDS even though by virtual of its name this is an internal (to bsd.gcc.mk) variable. I am keeping this for now and will address this in a better manner and work with the maintainer(s) of affected ports. For the time being, my patch below is an extended version of what Brendan shared and addresses (or tries to) issues he mentioned. Gerald Index: bsd.gcc.mk =================================================================== --- bsd.gcc.mk (revision 301695) +++ bsd.gcc.mk (working copy) @@ -178,29 +178,36 @@ . if ${_USE_GCC} == ${_GCCVERSION_${v}_V} . if ${OSVERSION} < ${_GCCVERSION_${v}_L} || ${OSVERSION} > ${_GCCVERSION_${v}_R} V:= ${_GCCVERSION_${v}_V:S/.//} -_GCC_BUILD_DEPENDS:= gcc${V} _GCC_PORT_DEPENDS:= gcc${V} +. if ${_USE_GCC} == ${GCC_DEFAULT_VERSION} +_GCC_PORT:= gcc +. else +_GCC_PORT:= gcc${V} +. endif CC:= gcc${V} CXX:= g++${V} CPP:= cpp${V} . if ${_USE_GCC} != 3.4 -CFLAGS+= -Wl,-rpath=${LOCALBASE}/lib/${_GCC_BUILD_DEPENDS} -LDFLAGS+= -Wl,-rpath=${LOCALBASE}/lib/${_GCC_BUILD_DEPENDS} +CFLAGS+= -Wl,-rpath=${LOCALBASE}/lib/${_GCC_PORT_DEPENDS} +LDFLAGS+= -Wl,-rpath=${LOCALBASE}/lib/${_GCC_PORT_DEPENDS} . if defined (USE_FORTRAN) . if ${USE_FORTRAN} == yes -FFLAGS+= -Wl,-rpath=${LOCALBASE}/lib/${_GCC_BUILD_DEPENDS} +FFLAGS+= -Wl,-rpath=${LOCALBASE}/lib/${_GCC_PORT_DEPENDS} . endif . endif +# The following is for the sakes of some ports which use this without +# ever telling us; to be fixed. +_GCC_BUILD_DEPENDS:= ${_GCC_PORT_DEPENDS} . endif . endif . endif .endfor .undef V -.if defined(_GCC_BUILD_DEPENDS) -BUILD_DEPENDS+= ${_GCC_PORT_DEPENDS}:${PORTSDIR}/lang/${_GCC_BUILD_DEPENDS} +.if defined(_GCC_PORT_DEPENDS) +BUILD_DEPENDS+= ${_GCC_PORT_DEPENDS}:${PORTSDIR}/lang/${_GCC_PORT} . if ${_USE_GCC} != 3.4 -RUN_DEPENDS+= ${_GCC_PORT_DEPENDS}:${PORTSDIR}/lang/${_GCC_BUILD_DEPENDS} +RUN_DEPENDS+= ${_GCC_PORT_DEPENDS}:${PORTSDIR}/lang/${_GCC_PORT} . if ${_USE_GCC} != 4.2 # Later GCC ports already depend on binutils; make sure whatever we # build leverages this as well.