This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [fortran,patch] Creating a common header to the front-end and runtime library
- From: "François-Xavier Coudert" <fxcoudert at gmail dot com>
- To: "Tobias Schlüter" <Tobias dot Schlueter at physik dot uni-muenchen dot de>
- Cc: "fortran at gcc dot gnu dot org" <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 29 Aug 2007 17:23:32 +0100
- Subject: Re: [fortran,patch] Creating a common header to the front-end and runtime library
- Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Pb+u4f9YfXrhabkWoKTKRNauSD2IAxnbo4MC4lPaHlVFvWSVM5zz0XrChWPup8/PIj44gzMIs+YLviGjxD7eyLG2bSo7RLkhKkN5Z/96sNRJ74UGGsITl6qayXOR2NoyiLRFXtWx4TEEi4V/NQ3wbM4TN3TiSRaGBzf/rgsDOJg=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=ei5ciObXE/1pPH5UZpa1t4PrU1+qLWf4/mjCJ45dhCnUTJtsoUAlPnHrCZygNyrUZPrtHjShR+ap+6HWEm//y4iuX/Iwy7ZB+NefoCPZQ2A4F/HikDvVNcUGpIjBWgQLGoKnf8Cgy0V9KMhUgv3wlntv3IMnGLvqAaieOoWckJE=
- References: <19c433eb0708290843o7729b04aif519ebca1fc3d92a@mail.gmail.com> <46D59AAB.9080609@physik.uni-muenchen.de>
> I think it's a clear win. Note that the library needs the compiler to
> be built, not the other way round, so it might make more sense to put
> the common file in gcc/fortran.
Yes. I put it in the library because I saw it as a bunch of
"characteristics of the library" that the front-end needed to know.
> I see that you haven't added Makefile rules for the dependency.
Very good point. For the front-end, they need to be added to
Make-lang.in (everywhere gfortran.h is), and I guess for the library
they are automagically handled, aren't they?
> With my supposed change you could do without
> cross-directory dependencies (just rebuild the library everytime the
> compiler changes), but this is far from optimal.
I think the right answer is beyond what a dependency system can do.
When you change the compiler, only you know whether it will affect
code-generation in a way that will matter for libgfortran. Since very
few changes actually affect the building of libgfortran, I suggest
that we keep the current system (no dependency; if you know you
changed something that requires rebuilding libgfortran, delete that
directory) except for adding dependency on the common header. How does
that sound?
> One alternative approach that I could think of is having a compiler flag
> that allows the compiler to dump a header file for the library. Then,
> while building the library you do
> gfortran --dump-compatibility-stuff > include/libgfortran_fe.h
>
> This wouldn't solve the dependency issues, though.
Too heavy for this particular task, I think.
FX