help-octave
[Top][All Lists]
Advanced

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

Re: Installing GCC-4.x in userspace / Compiling Octave from CVS


From: John W. Eaton
Subject: Re: Installing GCC-4.x in userspace / Compiling Octave from CVS
Date: Mon, 01 Oct 2007 20:41:17 -0400

On  1-Oct-2007, Sergei Steshenko wrote:

| 'lapack' needs that part of gcc-3.4.6.

I think you are going to have some problems if you are mixing code
compiled with the latest gfortran and code compiled with g77.  See the
explanation of the -ff2c option in the gfortran manual which says:

  `-ff2c'
       Generate code designed to be compatible with code generated by
       `g77' and `f2c'.

       The calling conventions used by `g77' (originally implemented in
       `f2c') require functions that return type default `REAL' to
       actually return the C type `double', and functions that return
       type `COMPLEX' to return the values via an extra argument in the
       calling sequence that points to where to store the return value.
       Under the default GNU calling conventions, such functions simply
       return their results as they would in GNU C - default `REAL'
       functions return the C type `float', and `COMPLEX' functions
       return the GNU C type `complex'.  Additionally, this option
       implies the `-fsecond-underscore' option, unless
       `-fno-second-underscore' is explicitly requested.

       This does not affect the generation of code that interfaces with
       the `libgfortran' library.

       _Caution:_ It is not a good idea to mix Fortran code compiled with
       `-ff2c' with code compiled with the default `-fno-f2c' calling
       conventions as, calling `COMPLEX' or default `REAL' functions
       between program parts which were compiled with different calling
       conventions will break at execution time.

       _Caution:_ This will break code which passes intrinsic functions
       of type default `REAL' or `COMPLEX' as actual arguments, as the
       library implementations use the `-fno-f2c' calling conventions.

See also the thread

  http://www.cae.wisc.edu/pipermail/bug-octave/2007-May/002494.html

which shows that this incompatibility does affect Octave.

jwe


reply via email to

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