Date: Tue, 6 Sep 2011 08:52:35 GMT From: - <bf@FreeBSD.org> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/160507: [PATCH] bsd.gcc.mk: prefer the default version of gcc to the minimum acceptable version in USE_GCC Message-ID: <201109060852.p868qZkW058812@red.freebsd.org> Resent-Message-ID: <201109060900.p86902bs013305@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 160507 >Category: ports >Synopsis: [PATCH] bsd.gcc.mk: prefer the default version of gcc to the minimum acceptable version in USE_GCC >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Sep 06 09:00:02 UTC 2011 >Closed-Date: >Last-Modified: >Originator: - >Release: >Organization: - >Environment: >Description: Change the USE_GCC construct so that if an acceptable version of gcc is not already installed on a machine when beginning the build of a port that requires one, then the new port build will favor the default version of gcc used by USE_FORTRAN=yes over the minimum acceptable version of gcc specified in the port's USE_GCC variable. This will save a lot of time in tinderboxes, and will mean that more default packages are compiled with a newer and better version of gcc, and that users of default packages will have to download and install multiple versions of gcc less often than they do now. >How-To-Repeat: >Fix: Patch attached with submission follows: Index: bsd.gcc.mk =================================================================== RCS file: /home/pcvs/ports/Mk/bsd.gcc.mk,v retrieving revision 1.54 diff -u -r1.54 bsd.gcc.mk --- bsd.gcc.mk 4 Sep 2011 16:56:11 -0000 1.54 +++ bsd.gcc.mk 6 Sep 2011 08:31:56 -0000 @@ -69,13 +69,16 @@ # If we are using GCC we still define whatever we'd usually do for C and # C++ as well. +GCC_VERSION_DEFAULT= 4.5 +GCC_V_DEFAULT= ${GCC_VERSION_DEFAULT:S/.//} + .if defined (USE_FORTRAN) # The default case, with a current lang/gcc port. . if ${USE_FORTRAN} == yes -_USE_GCC:= 4.5 -FC:= gfortran45 -F77:= gfortran45 +_USE_GCC:= ${GCC_VERSION_DEFAULT} +FC:= gfortran${GCC_V_DEFAULT} +F77:= gfortran${GCC_V_DEFAULT} # Intel Fortran compiler from lang/ifc. . elif ${USE_FORTRAN} == ifort @@ -158,9 +161,11 @@ _GCC_FOUND:= ${_GCCVERSION_${v}_V} . endif . endfor -.endif -.if defined(_GCC_FOUND) -_USE_GCC:=${_GCC_FOUND} +. if defined(_GCC_FOUND) +_USE_GCC:= ${_GCC_FOUND} +. elif ${_USE_GCC} < ${GCC_VERSION_DEFAULT} +_USE_GCC:= ${GCC_VERSION_DEFAULT} +. endif .endif .endif # defined(USE_GCC) >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201109060852.p868qZkW058812>