[RFC] Fortran search path for intrinsic includes and modules
Jakub Jelinek
jakub@redhat.com
Thu Nov 24 18:19:00 GMT 2005
On Thu, Nov 24, 2005 at 06:46:33PM +0100, Steven Bosscher wrote:
> On Nov 24, 2005 06:20 PM, Francois-Xavier Coudert <fxcoudert@gmail.com>
> wrote:
>
> > > /usr/finclude
> >
> > Well, I agree completely with all your points, but this finclude still
> > worries me a lot. I don't think it's a good idea at all to put things
> > in such a place, that seems so compiler-independent.
>
>
> Right. Other compilers give their modules the .mod extension too, and
> those .mods are incompatble with gfortran's. So we should put gfortran
> specific things in a gfortran specific place.
Here is another version of the patch, that appends unless -nostdinc
(like cpplib) -I /usr/lib/gcc/<target>/<version>/<multilibdir>/finclude
(if it exists), or some other path based on the default search algorithm
in the driver. The patch is incomplete, as it should also mkdir the
finclude directories in the right places (both during the build and
during make install).
--- gcc/fortran/lang-specs.h.jj 2005-11-24 13:24:32.000000000 +0100
+++ gcc/fortran/lang-specs.h 2005-11-24 19:13:29.000000000 +0100
@@ -15,7 +15,7 @@ This file is licensed under the GPL. */
%{E|M|MM:%(cpp_debug_options)}\
%{!M:%{!MM:%{!E: -o %|.f |\n\
f951 %|.f %{!ffree-form:-ffixed-form} %(cc1_options) %{J*} %{I*}\
- %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
+ %{!nostdinc:-I finclude%s} %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
{".F90", "@f95-cpp-input", 0, 0, 0},
{".F95", "@f95-cpp-input", 0, 0, 0},
{"@f95-cpp-input",
@@ -23,13 +23,13 @@ This file is licensed under the GPL. */
%{E|M|MM:%(cpp_debug_options)}\
%{!M:%{!MM:%{!E: -o %|.f95 |\n\
f951 %|.f95 %(cc1_options) %{J*} %{I*}\
- %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
+ %{!nostdinc:-I finclude%s} %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
{".f90", "@f95", 0, 0, 0},
{".f95", "@f95", 0, 0, 0},
{"@f95", "%{!E:f951 %i %(cc1_options) %{J*} %{I*}\
- %{!fsyntax-only:%(invoke_as)}}", 0, 0, 0},
+ %{!nostdinc:-I finclude%s} %{!fsyntax-only:%(invoke_as)}}", 0, 0, 0},
{".f", "@f77", 0, 0, 0},
{".for", "@f77", 0, 0, 0},
{".FOR", "@f77", 0, 0, 0},
{"@f77", "%{!E:f951 %i %{!ffree-form:-ffixed-form} %(cc1_options) %{J*} %{I*}\
- %{!fsyntax-only:%(invoke_as)}}", 0, 0, 0},
+ %{!nostdinc:-I finclude%s} %{!fsyntax-only:%(invoke_as)}}", 0, 0, 0},
Jakub
More information about the Fortran
mailing list