This patch introduces a new knob "USE_GCC_RELEASE". It provides an opportunity for users who prefer stable release (lang/gcc) rather than snapshots (lang/gcc4*) to stay with lang/gcc if its version satisfies USE_GCC requirement. It is useful in tinderbox. For example, a port with USE_GCC=4.6+ will depend on lang/gcc46 if lang/gcc was not installed. With USE_GCC_RELEASE=yes, the port will depend on lang/gcc instead of lang/gcc46. It eases the pain to rebuild snapshot again and again (weekly/bi-weekly/monthly updates). Maintainer (gerald@FreeBSD.org) is cc'd. Fix: --- bsd.gcc.mk.patch begins ---
Responsible Changed From-To: freebsd-ports-bugs->gerald bsd.gcc.mk is gerald territory (via the GNATS Auto Assign Tool)
Can we just keep it simple: update lang/gcc to 4.7.1, and switch to using it as the default version, instead of adding an extra knob? b.
On Sun, 1 Jul 2012, b. f. wrote: > Can we just keep it simple: update lang/gcc to 4.7.1, and switch to > using it as the default version, instead of adding an extra knob? No, we cannot update lang/gcc to GCC 4.7.0 or 4.7.1 since those two have an (undesired) ABI change that is going to be fixed with the GCC 4.7.2 release. That was an issue that caused some other systems quite a bit of grief. Based on experience of other systems switching compilers, I feel switching our default during the first half year or so a new upstream version of GCC is available is too risky/burdensome given breakage in other ports. If we switch with a bit of delay, other ports will have seen some fixes via upstream already. All that said, my proposal to address this PR is the patch below which pulls in lang/gcc instead of lang/gcc46 by default. (I have intentionally not made many updates to lang/gcc46 recently, but lang/gcc is designed to be maximally conversative, thus what the original requester is locking for.) 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.
Author: gerald Date: Fri Aug 3 02:28:37 2012 New Revision: 301878 URL: http://svn.freebsd.org/changeset/ports/301878 Log: Use the stable, slow moving lang/gcc instead of lang/gcc46 for USE_GCC=4.6 and USE_GCC=4.6+ and generally whenever the default version of GCC is employed. This will significantly benefit tinderboxes and the larger, reasonably conservative user base by reducing the amount of rebuilds. Rename _GCC_BUILD_DEPENDS to _GCC_PORT, but still set _GCC_BUILD_DEPENDS in the end for the sake of some ports relying on that. PR: 169449 Discussed with: bf Modified: head/Mk/bsd.gcc.mk Modified: head/Mk/bsd.gcc.mk ============================================================================== --- head/Mk/bsd.gcc.mk Fri Aug 3 02:21:37 2012 (r301877) +++ head/Mk/bsd.gcc.mk Fri Aug 3 02:28:37 2012 (r301878) @@ -178,29 +178,36 @@ _USE_GCC:= ${GCC_DEFAULT_VERSION} . 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${V} +LDFLAGS+= -Wl,-rpath=${LOCALBASE}/lib/gcc${V} . if defined (USE_FORTRAN) . if ${USE_FORTRAN} == yes -FFLAGS+= -Wl,-rpath=${LOCALBASE}/lib/${_GCC_BUILD_DEPENDS} +FFLAGS+= -Wl,-rpath=${LOCALBASE}/lib/gcc${V} . 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. _______________________________________________ svn-ports-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-ports-all To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
State Changed From-To: open->feedback Thanks for your suggestion, Sunpoet! Does the patch I just committed address your underlying need, or would you still want to have an explicit switch in addition? With USE_GCC=RELEASE, we'd enforce the use of lang/gcc always, even when a user would want to test drive lang/gcc48, for example. On the other hand, it would never have to be touched, as long as lang/gcc still builds all ports after an update which is nice as well.
Hi Gerald, I'm OK with the patch. It satisfies my requirement (to use lang/gcc instead of lang/gcc46). Please close this PR. Thanks. Regards, sunpoet
State Changed From-To: feedback->closed Cool, happy that it works for you.