summaryrefslogtreecommitdiff
path: root/Mk/bsd.gcc.mk
diff options
context:
space:
mode:
authorGerald Pfeifer <gerald@FreeBSD.org>2009-02-02 01:45:13 +0000
committerGerald Pfeifer <gerald@FreeBSD.org>2009-02-02 01:45:13 +0000
commit7693744e771c60939271ec42aababec8b9253444 (patch)
tree610a42658d7e7c44cb1e7b39eeee644668059224 /Mk/bsd.gcc.mk
parent- Use GNOME macro instead of ${MASTER_SITE_GNOME}, remove (diff)
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
Notes
Notes: svn path=/head/; revision=227417
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}