Wed Apr 25 16:28:19 2012 UTC ()
If unset, set PKGSRC_FORTRAN accordingly if g77 or gfortran exist.


(hans)
diff -r1.119 -r1.120 pkgsrc/mk/compiler/gcc.mk

cvs diff -r1.119 -r1.120 pkgsrc/mk/compiler/gcc.mk (expand / switch to unified diff)

--- pkgsrc/mk/compiler/gcc.mk 2012/04/24 07:44:11 1.119
+++ pkgsrc/mk/compiler/gcc.mk 2012/04/25 16:28:18 1.120
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: gcc.mk,v 1.119 2012/04/24 07:44:11 sbd Exp $ 1# $NetBSD: gcc.mk,v 1.120 2012/04/25 16:28:18 hans Exp $
2# 2#
3# This is the compiler definition for the GNU Compiler Collection. 3# This is the compiler definition for the GNU Compiler Collection.
4# 4#
5# User-settable variables: 5# User-settable variables:
6# 6#
7# USE_NATIVE_GCC 7# USE_NATIVE_GCC
8# When set to "yes", the native gcc is used, no matter which 8# When set to "yes", the native gcc is used, no matter which
9# compiler version a package requires. 9# compiler version a package requires.
10# 10#
11# USE_PKGSRC_GCC 11# USE_PKGSRC_GCC
12# Force using the appropriate version of GCC from pkgsrc based on 12# Force using the appropriate version of GCC from pkgsrc based on
13# GCC_REQD instead of the native compiler. 13# GCC_REQD instead of the native compiler.
14# 14#
@@ -579,34 +579,36 @@ PKG_CPP:= ${_GCC_CPP} @@ -579,34 +579,36 @@ PKG_CPP:= ${_GCC_CPP}
579_GCC_VARS+= CXX 579_GCC_VARS+= CXX
580_GCC_CXX= ${_GCC_DIR}/bin/${_GCC_BIN_PREFIX}g++ 580_GCC_CXX= ${_GCC_DIR}/bin/${_GCC_BIN_PREFIX}g++
581_ALIASES.CXX= c++ g++ 581_ALIASES.CXX= c++ g++
582CXXPATH= ${_GCCBINDIR}/${_GCC_BIN_PREFIX}g++ 582CXXPATH= ${_GCCBINDIR}/${_GCC_BIN_PREFIX}g++
583PKG_CXX:= ${_GCC_CXX} 583PKG_CXX:= ${_GCC_CXX}
584.endif 584.endif
585.if exists(${_GCCBINDIR}/${_GCC_BIN_PREFIX}g77) 585.if exists(${_GCCBINDIR}/${_GCC_BIN_PREFIX}g77)
586_GCC_VARS+= FC 586_GCC_VARS+= FC
587_GCC_FC= ${_GCC_DIR}/bin/${_GCC_BIN_PREFIX}g77 587_GCC_FC= ${_GCC_DIR}/bin/${_GCC_BIN_PREFIX}g77
588_ALIASES.FC= f77 g77 588_ALIASES.FC= f77 g77
589FCPATH= ${_GCCBINDIR}/${_GCC_BIN_PREFIX}g77 589FCPATH= ${_GCCBINDIR}/${_GCC_BIN_PREFIX}g77
590F77PATH= ${_GCCBINDIR}/${_GCC_BIN_PREFIX}g77 590F77PATH= ${_GCCBINDIR}/${_GCC_BIN_PREFIX}g77
591PKG_FC:= ${_GCC_FC} 591PKG_FC:= ${_GCC_FC}
 592PKGSRC_FORTRAN?= g77
592.endif 593.endif
593.if exists(${_GCCBINDIR}/${_GCC_BIN_PREFIX}gfortran) 594.if exists(${_GCCBINDIR}/${_GCC_BIN_PREFIX}gfortran)
594_GCC_VARS+= FC 595_GCC_VARS+= FC
595_GCC_FC= ${_GCC_DIR}/bin/${_GCC_BIN_PREFIX}gfortran 596_GCC_FC= ${_GCC_DIR}/bin/${_GCC_BIN_PREFIX}gfortran
596_ALIASES.FC= gfortran 597_ALIASES.FC= gfortran
597FCPATH= ${_GCCBINDIR}/${_GCC_BIN_PREFIX}gfortran 598FCPATH= ${_GCCBINDIR}/${_GCC_BIN_PREFIX}gfortran
598F77PATH= ${_GCCBINDIR}/${_GCC_BIN_PREFIX}gfortran 599F77PATH= ${_GCCBINDIR}/${_GCC_BIN_PREFIX}gfortran
599PKG_FC:= ${_GCC_FC} 600PKG_FC:= ${_GCC_FC}
 601PKGSRC_FORTRAN?= gfortran
600.endif 602.endif
601_COMPILER_STRIP_VARS+= ${_GCC_VARS} 603_COMPILER_STRIP_VARS+= ${_GCC_VARS}
602 604
603# Pass the required flags to imake to tell it we're using gcc on Solaris. 605# Pass the required flags to imake to tell it we're using gcc on Solaris.
604.if ${OPSYS} == "SunOS" 606.if ${OPSYS} == "SunOS"
605IMAKEOPTS+= -DHasGcc2=YES -DHasGcc2ForCplusplus=YES 607IMAKEOPTS+= -DHasGcc2=YES -DHasGcc2ForCplusplus=YES
606.endif 608.endif
607 609
608.if ${OPSYS} == "SunOS" 610.if ${OPSYS} == "SunOS"
609_COMPILER_ABI_FLAG.64= -m64 611_COMPILER_ABI_FLAG.64= -m64
610.endif 612.endif
611 613
612.if ${OPSYS} == "Darwin" 614.if ${OPSYS} == "Darwin"