As one of the upstream developers, I would currently recommend against this patch.

FFTW itself contains no Fortran code. It only uses the Fortran compiler to detect how Fortran linking works in order to provide Fortran-callable wrappers. This link detection should work with both g77 and gfortran, but will produce different results.

gfortran, like many other Fortran compilers (e.g. Intel, IBM), converts all identifiers to lower-case plus an underscore. g77, however, uses an odd behavior inherited from f2c: it converts all identifiers to lower-case plus an underscore, plus an extra underscore if the identifier contains an underscore. This means that the same functions are not callable from g77 and gfortran simultaneously if they contain underscores (like all FFTW functions).

If you configure FFTW with gfortran (e.g. if gfortran is present but not g77), then FFTW will be callable from gfortran and most other Fortran compilers, but not from g77.

If you configure FFTW with g77 (which is the default if g77 is present, even if gfortran is present as well), then FFTW will be callable from *both* g77 and gfortran. The reason is that FFTW detects g77's odd behavior and includes two versions of the Fortran-callable wrappers: one for g77 and one for other Fortran compilers without the extra underscore.

Because of this, FFTW libraries configured with g77 are currently more appropriate for Debian; switching to gfortran may break the library for some developers (and some programs?).

Regards,
Steven G. Johnson

PS. On the other hand, I can certainly see the motivation for switching to gfortran: g77 is not available in recent gcc versions, and thus including it in the build-depends requires the build machine to install a bunch of legacy gcc code. In the next upstream version of FFTW, I'm planning on adding a --with-g77-wrappers flag to force inclusion of g77-compatible wrappers, so that you can configure with gfortran and still remain g77-compatible.


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to