[cfe-commits] [RFC and PATCH] Fortran

Hal Finkel hfinkel at anl.gov
Fri May 4 11:45:07 PDT 2012

On Fri, 4 May 2012 19:35:21 +0200
Joerg Sonnenberger <joerg at britannica.bec.de> wrote:

> On Fri, May 04, 2012 at 07:21:03PM +0200, Matthieu Monrocq wrote:
> > One minor nit: I can certainly understand reusing the
> > lexer/preprocessor if it is nearly identical and the tooling
> > mechanism just added by Manuel because it's a great infrastructure,
> > however on the other hand I am not sure about the driver itself...
> There is a certain amount of expectation from gcc that
> clang -O2 -c hello.F
> does something sane. Other than that and possible integration with a
> future fork-free clang driver, it is mostly standalone.

The process of compiling Fortran is very similar to compiling C
(except that some additional runtime libraries might be necessary). All
of the code in the Driver library dealing with toolchains, ABIs, etc. on
various platforms will be necessary, and reusing it will be essential.

The code in clang/tools/driver would, as far as I can tell, be exactly
duplicated in a Fortran driver.

I believe that all of the necessary changes are in the patch, and as
you can see, they're really quite small. It is true that this does not
include the additional command-line options that we might wish to add,
but I don't think there are a lot of those. gfortran, for example,
only has ~20 language options and ~20 code-gen options. Some of these
are legacy options that we would not replicate.

Thanks again,

> Joerg
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Hal Finkel
Postdoctoral Appointee
Leadership Computing Facility
Argonne National Laboratory

More information about the cfe-commits mailing list