pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk/compiler when using sunpro, go ahead and use the su...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/d9e824137e9a
branches:  trunk
changeset: 523999:d9e824137e9a
user:      dmcmahill <dmcmahill%pkgsrc.org@localhost>
date:      Tue Jan 16 17:16:24 2007 +0000

description:
when using sunpro, go ahead and use the sun fortran compiler insted of f2c.  The former seems to work as well or better

diffstat:

 mk/compiler/sunpro.mk |  32 +++++++++++++++++++++++---------
 1 files changed, 23 insertions(+), 9 deletions(-)

diffs (52 lines):

diff -r 7209f1520663 -r d9e824137e9a mk/compiler/sunpro.mk
--- a/mk/compiler/sunpro.mk     Tue Jan 16 17:16:20 2007 +0000
+++ b/mk/compiler/sunpro.mk     Tue Jan 16 17:16:24 2007 +0000
@@ -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 @@
 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 @@
 .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



Home | Main Index | Thread Index | Old Index