Re: fw: gfortran transition release goal proposal
- To: "Kevin B. McCarty" <kmccarty@Princeton.EDU>
- Cc: Riku Voipio <email@example.com>, firstname.lastname@example.org, email@example.com, firstname.lastname@example.org, email@example.com, firstname.lastname@example.org, email@example.com, firstname.lastname@example.org, email@example.com, firstname.lastname@example.org
- Subject: Re: fw: gfortran transition release goal proposal
- From: Adam C Powell IV <email@example.com>
- Date: Mon, 23 Jul 2007 19:16:29 -0400
- Message-id: <[🔎] firstname.lastname@example.org>
- In-reply-to: <[🔎] 46A51473.email@example.com>
- References: <[🔎] 20070721221914.GA19890@kos.to> <[🔎] firstname.lastname@example.org> <[🔎] 46A51473.email@example.com>
On Mon, 2007-07-23 at 13:49 -0700, Kevin B. McCarty wrote:
> Adam C Powell IV wrote:
> > So it seems getarg, which is needed for mpich, is missing from gfortran,
> > as are other variants used by other fortran compilers. Is there a
> > gfortran equivalent?
> > Thanks,
> > -Adam
> I've been using this hack for getarg, building it into the base Cernlib
> library "libkernlib" only in the case of compiling with gfortran:
> ***** Begin getarg.F
> * Wrapper GETARG routine for gfortran,
> * originally written by Harald Vogt <hvogt (at) ifh (dot) de>
> SUBROUTINE GETARG (JARG, CHARG)
> * The following stuff is required to use gfortrans inline routine
> * It is required to avoid the calling GETARG here which conflicts
> * to the Fortran rules
> CHARACTER CHARG*(*)
> CALL MYGETARG (JARG, CHARG)
> SUBROUTINE MYGETARG (JARG, CHARG)
> CHARACTER CHARG*(*)
> * gfortran translates the following line to a call
> * to its library routine _gfortran_getarg_i4
> * therefore it will not clash in the linking step
> CALL GETARG (JARG, CHARG)
> ***** End getarg.F
> Note, I haven't checked that this still works with gfortran-4.2.
Wow, impressive and elegant little hack!
> Of course, this won't help your configure script not to fail. Also, in
> the long run this is not a good solution, since there could be problems
> if this object code appears in several different linked libraries
> (especially if there are different versions). Would be better if the
> missing getarg_ symbol could be put into libgfortran.
> N.B. I want to emphasize that since I haven't uploaded a version of
> Cernlib compiled against gfortran yet, this hack doesn't exist in any
> object code already in Debian (to the best of my knowledge).
Well I can always shoehorn it into the configure file. But if it's this
simple, it seems like a trivial patch for someone who knows gfortran
GPG fingerprint: D54D 1AEE B11C CE9B A02B C5DD 526F 01E8 564E E4B6
Welcome to the best software in the world today cafe!