diff options
author | gerald <gerald@FreeBSD.org> | 2011-10-30 09:34:38 +0800 |
---|---|---|
committer | gerald <gerald@FreeBSD.org> | 2011-10-30 09:34:38 +0800 |
commit | b27c56b693f7bc3a7a79474de87b07f3a800268d (patch) | |
tree | b6724c6e489f79e0893439e639e8c6e27e7b66a0 /Mk | |
parent | 435361b35251629d47e568f7f575ec1379441320 (diff) | |
download | freebsd-ports-gnome-b27c56b693f7bc3a7a79474de87b07f3a800268d.tar.gz freebsd-ports-gnome-b27c56b693f7bc3a7a79474de87b07f3a800268d.tar.zst freebsd-ports-gnome-b27c56b693f7bc3a7a79474de87b07f3a800268d.zip |
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
Diffstat (limited to 'Mk')
-rw-r--r-- | Mk/bsd.gcc.mk | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/Mk/bsd.gcc.mk b/Mk/bsd.gcc.mk index e6ab7d137677..1444379f8052 100644 --- a/Mk/bsd.gcc.mk +++ b/Mk/bsd.gcc.mk @@ -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) |