Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Jul 2012 01:55:17 +0200 (CEST)
From:      Gerald Pfeifer <gerald@pfeifer.com>
To:        Brendan Fabeny <bf1783@gmail.com>, Kevin Oberman <kob6558@gmail.com>
Cc:        freebsd-ports@FreeBSD.org
Subject:   Re: lang/gcc46
Message-ID:  <alpine.LNX.2.00.1207300152200.2533@gerinyyl.fvgr>
In-Reply-To: <CAGFTUwNbj0mDrdu40dwkmECLhrc0Uwap=8UKi=tbBgRCTvZTMQ@mail.gmail.com>
References:  <CAGFTUwNbj0mDrdu40dwkmECLhrc0Uwap=8UKi=tbBgRCTvZTMQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.LNX.2.00.1207300152200.2533>