This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: binaries for mnay platforms


However, it would be ideal, if I could crosscompile all of
these binaries on our main machine. Only problem is that I do not know what
is possible. Which binaries can be produced from one machine and when would
I need direct access to the target machine.

I'm not sure whether you want to build a cross-compiler so that you can generate binaries of Fortran programs for multiple targets, or if you're willing to distribute gfortran on multiple platforms, and would like to compile all these native compilers on a single box. So, here is info for both cases:


You can probably build a gfortran cross-compiler with build == host == "any arch that can host GCC", and target == "any arch for which gfortran can run on"; this latter means most non-embedded systems (including all POSIX archs).

Now, you can also cross-compile gfortran itself, with build == A and host == target == B. This requires that you first build a cross- compiler (with C and Fortran enabled) with build == host == A and target == B. Then, you can build your final (build == A, host == target == B) compiler, and the earlier cross-compiler (build == host == A and target == B) will be used for compiling libgfortran, the GNU Fortran runtime library.


I've played with both in the past (combinations of i386-mingw32, x86_64-linux, i686-linux and sparc-solaris), and it worked OK IIRC. The only gfortran-specific subtlety is that you might need to teach the libgfortran configury a few things about your target arch in order to benefit from some of the features (FPE trapping especially).


One last thing: if you find anything that's not working in a particular setup, and that is directly linked to gfortran/ libgfortran, please report here and we'll find a way to fix it.

Regards,
FX


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]