autoconf-patches
[Top][All Lists]
Advanced

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

Re: Fortran 90/95 support (autoconf)


From: Christian Marquardt
Subject: Re: Fortran 90/95 support (autoconf)
Date: Fri, 6 Jul 2001 13:44:15 +0200 (CEST)

Hi Steven, hi Lassi,

On  5 Jul, Steven G. Johnson wrote:
> Please, can we avoid copy-and-paste reuse?  To the degree to which macros
> are similar, they should share the same code.

I very much agree. I tried, though run into the problem that in the
generated configure scripts shell variables got screwed up when using
both the f77 and the f90 stuff. I'm not saying it can't (and shouldn't)
be done. It's just me who is too stupid to sort things out. I apologize
(and hope for help!!!)

> Fortran compiler that was selected.  It is hard for me to imagine a
> project that would mix, say, f90 and f77, and which would not be willing
> to use the f90 compiler for the f77 stuff.

I do that all the time actually. Here's why:

For one, you might want to use their native f77 compiler for
performance reasons, compiling a few routines with a slow (say f90 -> C
converter type of thing) f90 "compiler". Second, even g77 has features
that are non-standard in the official f77 - take the byte type, or
Cray-style pointers (ok, not g77, but others). F90 compilers tend to be
more conservative about the f77 standard than their f77 counterparts;
they often do not support extensions that are wide spread in old code.
For example, Sun's f90/f95 does not support byte, it's f77 counterpart
does. Other f90 compilers might not support cray style pointers (NAG?)
etc. Rather than rewriting thousands of lines of old proven Fortran
code, I'd prefer to use the f77 compiler that I know to work.

> I'm also skeptical of LD9[05]FLAGS.  Autoconf uses a single LDFLAGS for
> every other language; why should F9[05] be different?

LD9[05]FLAGS is only used if it has been set explicitely before,
i.e. in configure.ac; actually, both LDFLAGS and LD9[05]FLAGS are used
for F90/f95 linking. I should add that, with my first version a few
weeks ago, I also submitted a patch to automake that generates linking
rules using both LDFLAGS and LF9[05]FLAGS for f90/f95 linking. Thus,
LD9[05]FLAGS is an additional optional set of linking options for f90.
It is not set by any of the macros.

And on  6 Jul, Lassi A. Tuura wrote:
> The reason is mixed languages linking tests. I actually worry more about

Yep - my rationale behind this is a problem on Solaris: I/O libraries
of f77 and f90 shipped by Sun are incompatible. Thus, if objects
compiled with f77 are linked with f90 objects using f90 as linker, an
additional library (-lf77compat) has to be linked as soon as any I/O
occures - like printing error messages. The same applies if any f77
compiled library is linked against f90 objects - imagine you use the
huge scientific (or other) library written and compiled with f77 in your
f90 application. On the other hand, when linking only f77 objects
against the same library using f77, the linking process bails out if
-lf77compat is specified. Using LD90FLAGS on a Solaris platform gives me
the opportunity to use both f77 and f90 applications in the same
project, which is what I frequently do.

Regards,

  Chris.


-- 

  Christian Marquardt

  GFZ Potsdam, Div. 1             |       Tel.: (+49) 331-288-1168
  Am Telegrafenberg               |       Fax:  (+49) 331-288-1732
  D-14473 Potsdam                 |       Email: address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]