From 5e003ae09932beed788d98a4e1be6cd57694eb3f Mon Sep 17 00:00:00 2001 From: dmcmahill Date: Tue, 16 Jan 2007 17:16:24 +0000 Subject: when using sunpro, go ahead and use the sun fortran compiler insted of f2c. The former seems to work as well or better --- mk/compiler/sunpro.mk | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) (limited to 'mk') diff --git a/mk/compiler/sunpro.mk b/mk/compiler/sunpro.mk index 153ba0e68a8..e128d6c5a66 100644 --- a/mk/compiler/sunpro.mk +++ b/mk/compiler/sunpro.mk @@ -1,4 +1,4 @@ -# $NetBSD: sunpro.mk,v 1.36 2006/12/15 12:46:24 martti Exp $ +# $NetBSD: sunpro.mk,v 1.37 2007/01/16 17:16:24 dmcmahill Exp $ # # This is the compiler definition for the SUNWspro C compiler. # @@ -38,6 +38,14 @@ _ALIASES.CXX= CC c++ g++ CXXPATH= ${SUNWSPROBASE}/bin/CC PKG_CXX:= ${_SUNPRO_CXX} .endif +.if exists(${SUNWSPROBASE}/bin/f77) +LANGUAGES.sunpro+= fortran +_SUNPRO_VARS+= FC +_SUNPRO_FC= ${_SUNPRO_DIR}/bin/f77 +_ALIASES.FC= f77 g77 +FCPATH= ${SUNWSPROBASE}/bin/f77 +PKG_FC:= ${_SUNPRO_FC} +.endif _COMPILER_STRIP_VARS+= ${_SUNPRO_VARS} # The Solaris linker uses "-R" for rpath directives. @@ -97,13 +105,19 @@ ${_SUNPRO_${_var_}}: .endfor # Force the use of f2c-f77 for compiling Fortran. -_SUNPRO_USE_F2C= no -FCPATH= /nonexistent -.if !exists(${FCPATH}) -_SUNPRO_USE_F2C= yes -.endif -.if !empty(_SUNPRO_USE_F2C:M[yY][eE][sS]) -. include "../../mk/compiler/f2c.mk" -.endif +#_SUNPRO_USE_F2C= no +#FCPATH= /nonexistent +#.if !exists(${FCPATH}) +#_SUNPRO_USE_F2C= yes +#.endif +#.if !empty(_SUNPRO_USE_F2C:M[yY][eE][sS]) +# libtool keys off of the compiler name when configuring. The unfortunate +# side effect is that if we let "f2c-f77" be called "f77" on solaris then +# libtool thinks we're using the Sun fortran compiler and it will add +# '-Qoption ld' to the compiler flags which get passed to the C compiler and +# those are not understood. So make sure we call the compiler g77 instead. +#FC= g77 +#. include "../../mk/compiler/f2c.mk" +#.endif .endif # COMPILER_SUNPRO_MK -- cgit v1.2.3