aboutsummaryrefslogtreecommitdiffstats
path: root/Mk/bsd.gcc.mk
diff options
context:
space:
mode:
authorgerald <gerald@FreeBSD.org>2009-02-02 09:45:13 +0800
committergerald <gerald@FreeBSD.org>2009-02-02 09:45:13 +0800
commit9d3ddca7f952642c396f54270ef81cfeaf398160 (patch)
treebb85c55c51215a56127790509a13e44ac622b90c /Mk/bsd.gcc.mk
parent56fcc5f4afd03a3eb53f30b6fc8eca1afcdc623b (diff)
downloadfreebsd-ports-gnome-9d3ddca7f952642c396f54270ef81cfeaf398160.tar.gz
freebsd-ports-gnome-9d3ddca7f952642c396f54270ef81cfeaf398160.tar.zst
freebsd-ports-gnome-9d3ddca7f952642c396f54270ef81cfeaf398160.zip
Set CC and CXX to match the choice of GNU Fortran compilers for C and
C++, too, to avoid subtle compatibility problems. Diagnose the case where an unexpected value is provided for USE_FORTRAN. Fix the OSVERSION for which lang/gcc34 should be used foor USE_FORTRAN=g77 according to our Porters Handbook. Add RUN_DEPENDS to the output of the test-gcc target. PR: 131114 Submitted by: bf2006a@yahoo.com
Diffstat (limited to 'Mk/bsd.gcc.mk')
-rw-r--r--Mk/bsd.gcc.mk21
1 files changed, 15 insertions, 6 deletions
diff --git a/Mk/bsd.gcc.mk b/Mk/bsd.gcc.mk
index d639a9c8432c..e118a472d443 100644
--- a/Mk/bsd.gcc.mk
+++ b/Mk/bsd.gcc.mk
@@ -66,34 +66,42 @@ GCCVERSION_040400= 999999 999999 4.4
#
.if defined (USE_FORTRAN)
+
# gfortran43 from lang/gcc43 is the default for now.
. if ${USE_FORTRAN} == yes
BUILD_DEPENDS+= gfortran43:${PORTSDIR}/lang/gcc43
RUN_DEPENDS+= gfortran43:${PORTSDIR}/lang/gcc43
FC:= gfortran43
F77:= gfortran43
-. endif
+CC:= gcc43
+CXX:= g++43
# Intel Fortran compiler from lang/ifc.
-. if ${USE_FORTRAN} == ifort
+. elif ${USE_FORTRAN} == ifort
BUILD_DEPENDS+= ${LOCALBASE}/intel_fc_80/bin/ifort:${PORTSDIR}/lang/ifc
RUN_DEPENDS+= ${LOCALBASE}/intel_fc_80/bin/ifort:${PORTSDIR}/lang/ifc
FC:= ${LOCALBASE}/intel_fc_80/bin/ifort
F77:= ${LOCALBASE}/intel_fc_80/bin/ifort
-. endif
# In some case we want to use g77 from lang/gcc34 (FreeBSD>=7) or f77
# (FreeBSD<=6).
-. if ${USE_FORTRAN} == g77
-. if (${OSVERSION} > 700000)
+. elif ${USE_FORTRAN} == g77
+. if (${OSVERSION} > 700042)
BUILD_DEPENDS+= g77-34:${PORTSDIR}/lang/gcc34
RUN_DEPENDS+= g77-34:${PORTSDIR}/lang/gcc34
FC:= g77-34
F77:= g77-34
-.else
+CC:= gcc34
+CXX:= g++34
+. else
F77:= f77
FC:= f77
+CC:= gcc
+CXX:= g++
. endif
+
+. else
+IGNORE= specifies unknown value "${USE_FORTRAN}" for USE_FORTRAN
. endif
CONFIGURE_ENV+= F77="${F77}" FC="${FC}" FFLAGS="${FFLAGS}"
@@ -223,3 +231,4 @@ test-gcc:
@echo CC=${CC} - CXX=${CXX} - CFLAGS=${CFLAGS}
@echo F77=${F77} - FC=${FC} - FFLAGS=${FFLAGS}
@echo BUILD_DEPENDS=${BUILD_DEPENDS}
+ @echo RUN_DEPENDS=${RUN_DEPENDS}