ports/58317: [patch] add GCCVERSION makevar to bsd.port.mk

Mark Linimon linimon at lonesome.com
Tue Oct 21 04:10:08 UTC 2003


>Number:         58317
>Category:       ports
>Synopsis:       [patch] add GCCVERSION makevar to bsd.port.mk
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Oct 20 21:10:05 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator:     Mark Linimon
>Release:        FreeBSD 4.9-PRERELEASE i386
>Organization:
Lonesome Dove Computing Services
>Environment:
System: FreeBSD lonesome.lonesome.com 4.9-PRERELEASE FreeBSD 4.9-PRERELEASE #0: Fri Sep 5 01:19:33 CDT 2003 linimon at lonesome.lonesome.com:/usr/src/sys/compile/MULTIMEDIA_DEBUG i386
>Description:
	Recent bento build logs reflect the fact that many ports were
	broken by the gcc3.3 import.  In many of these, myself and
	others have added a conditional evaluation of BROKEN, using
	OSVERSION as a proxy for "when GCCx.y was imported".  However,
	few people remember to look up the exact version, and in
	general just use 501000.  The following patch removes the need
	to use a proxy, and in addition gets the answer exactly right.

	Thus, port Makefiles can be changed from the following:

	.if ${OSVERSION} >= 501000
	BROKEN=	"will not compile on FreeBSD version ${OSVERSION}
	.endif

	to

	.if ${GCCVERSION} >= 303000
	BROKEN=	"will not compile using gcc version ${GCCVERSION}
	.endif
>How-To-Repeat:
	(n/a)
>Fix:

--- bsd.port.mk.dist	Mon Oct 20 22:43:41 2003
+++ bsd.port.mk	Mon Oct 20 22:36:35 2003
@@ -1361,32 +1372,58 @@
 # END LIBTOOL
 ######################################################################
 
+.if defined(USE_GCC)
+.if ${OSVERSION} < 400012
+GCCVERSION=		020702
+.endif
+.if ${OSVERSION} >= 400012 && ${OSVERSION} < 500035
+GCCVERSION=		029500
+.endif
+.if ${OSVERSION} >= 500035 && ${OSVERSION} < 500039
+GCCVERSION=		030100
+.endif
+.if ${OSVERSION} >= 500039 && ${OSVERSION} < 501103
+GCCVERSION=		030200
+.endif
+.if ${OSVERSION} >= 501103
+GCCVERSION=		030301
+.endif
+.if ${OSVERSION} >= 599999
+GCCVERSION=		030400
+.endif
+.endif
+
 .if defined(USE_GCC) && ${USE_GCC} == 2.95 && ( ${OSVERSION} < 400012 || ${OSVERSION} > 500034 )
 CC=				gcc295
 CXX=			g++295
 BUILD_DEPENDS+=	gcc295:${PORTSDIR}/lang/gcc295
 MAKE_ENV+=		CC=${CC} CXX=${CXX}
+GCCVERSION=		029500
 .endif
 .if defined(USE_GCC) && ${USE_GCC} == 3.1 && ( ${OSVERSION} < 500035 || ${OSVERSION} > 500038 )
 CC=				gcc31
 CXX=			g++31
 BUILD_DEPENDS+=	gcc31:${PORTSDIR}/lang/gcc31
 MAKE_ENV+=		CC=${CC} CXX=${CXX}
+GCCVERSION=		030100
 .endif
 .if defined(USE_GCC) && ${USE_GCC} == 3.2 && ${OSVERSION} < 500039
 CC=				gcc32
 CXX=			g++32
 BUILD_DEPENDS+=	gcc32:${PORTSDIR}/lang/gcc32
+GCCVERSION=		030200
 .endif
 .if defined(USE_GCC) && ${USE_GCC} == 3.3 && ${OSVERSION} < 501103
 CC=				gcc33
 CXX=			g++33
 BUILD_DEPENDS+=	gcc33:${PORTSDIR}/lang/gcc33
+GCCVERSION=		030301
 .endif
 .if defined(USE_GCC) && ${USE_GCC} == 3.4 # Not yet available in any OSVERSION
 CC=				gcc34
 CXX=			g++34
 BUILD_DEPENDS+=	gcc34:${PORTSDIR}/lang/gcc34
+GCCVERSION=		030400
 .endif
 
 .if defined(USE_GETOPT_LONG)
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list