1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-22 20:41:26 +00:00

When USE_GCC=X.Y+ has been specified, prefer the default version of

GCC (the one which also USE_FORTRAN=yes chooses) in case we do have
to install GCC in any case.  Only if an acceptable version of GCC
is already present use that one.

This will ease the load on tinderboxes, further the use of current
versions of GCC, and minimize the need to download/carry several
versions of GCC for users of pre-built packages.

PR:		160507
Submitted by:	bf
This commit is contained in:
Gerald Pfeifer 2011-10-30 01:34:38 +00:00
parent 9e890746ed
commit af5f25332e
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=284690

View File

@ -48,6 +48,9 @@ GCCVERSION_040500= 0 0 4.5
GCCVERSION_040600= 0 0 4.6
GCCVERSION_040700= 0 0 4.7
GCC_DEFAULT_VERSION= 4.6
GCC_DEFAULT_V= ${GCC_DEFAULT_VERSION:S/.//}
#
# No configurable parts below this.
#
@ -73,9 +76,9 @@ _GCCVERSION_${v}_V= ${j}
# The default case, with a current lang/gcc port.
. if ${USE_FORTRAN} == yes
_USE_GCC:= 4.6
FC:= gfortran46
F77:= gfortran46
_USE_GCC:= ${GCC_DEFAULT_VERSION}
FC:= gfortran${GCC_DEFAULT_V}
F77:= gfortran${GCC_DEFAULT_V}
# Intel Fortran compiler from lang/ifc.
. elif ${USE_FORTRAN} == ifort
@ -160,7 +163,9 @@ _GCC_FOUND:= ${_GCCVERSION_${v}_V}
. endfor
.endif
.if defined(_GCC_FOUND)
_USE_GCC:=${_GCC_FOUND}
_USE_GCC:= ${_GCC_FOUND}
.elif ${_USE_GCC} < ${GCC_DEFAULT_VERSION}
_USE_GCC:= ${GCC_DEFAULT_VERSION}
.endif
.endif # defined(USE_GCC)