Re: Praise for Gfortran (finally)
  Home FAQ Contact Sign in
comp.lang.fortran only
 
Advanced search
POPULAR GROUPS

more...

 Up
Re: Praise for Gfortran (finally)         

Group: comp.lang.fortran · Group Profile
Author: Tobias Burnus
Date: Sep 19, 2008 04:29

On Sep 19, 11:27 am, "tho...@antispam.ham" ifa.hawaii.edu>
wrote:
>> I think the typical way one gets deeply involved with gfortran
>> development is as follows:
>
> I'm interested in seeing gfortran ported to another operating
> system.  I'm assuming that gfortran itself is written in C or
> some variant of C, which means a prerequisite is having a C
> compiler for that operating system, but as far as I know, the
> available version of the gnu C compiler is too old.  Perhaps
> someone can list the steps necessary to port gfortran to
> another operating system.

If I understand it correctly, you have a system on which an older
"gcc" works, but it is too old to compile the current GCC. Assuming
that GCC is still supported on that platform, you should try to find
the newest GCC which still compiles with your old GCC (or any other C
compiler) and then use the newer GCC to compile GCC 4.4. (Another
possibility is to build an cross-compiler.)

The typical build of GCC is a three-stage process: Stage 1 uses the
installed compiler (e.g. the old GCC or a vendor compiler) to compile
a Stage1 C compiler. This compiler is then used to compile the real
GCC compiler in stage2 which is then used in stage3 to compile itself
again (including a check that stage2 and stage3 produce the same
code). Thus you only need a compiler which can create the Stage1 C
compiler.

Assuming the C part of GCC 4.4 works on the system of interest: The
front end (i.e. the actual compiler) should compile and work
flawlessly. The challenge is then the library ("libgfortran"):
Depending on the system, one needs to create stubs or system specific
functions. (By the way, the library is partially written in C [most
parts] and partially written in Fortran.) Especially on embedded
systems libgfortran might not compile or needs some special stubs.

For completeness: If your system ("target") is not supported by GCC,
you need to spend more time to get GCC working on the system,
especially if the processor is not supported since you need then to
change the part of GCC which generates the assembler. (And you need an
assembler/linker.) [If your system was supported but no longer is
supported, one could start with the old, now removed files; but unless
your system is really old I somehow doubt that your system is already
deprecated and no longer supported.]

By the way: Which processor / operating system do you have in mind?

Tobias
no comments
diggit! del.icio.us! reddit!