libgomp installs the following headers files into $PREFIX/include: omp.h omp_lib.f90 omp_lib.h (if Fortran is not build, more if Fortran is built). This does not allow one to install several versions of GCC into the same prefix using --program-suffix. Note that the C++ headers, for example, handle this very nicely, by using $PREFIX/include/c++/4.2.0/. This is a regression introduced with the addition of libgomp.
Confirmed.
I'm using in the Fedora Core gcc following patch: 2005-11-24 Jakub Jelinek <jakub@redhat.com> * lang-specs.h: Unless -nostdinc, append -I .../finclude to f951 command line options. --- 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}, and move the files manually. When Fortran OpenMP support is merged in, I'll take care of this as well.
Can you instead fix this now as this is a regression and really regressions should not be left to the last minute any more.
Subject: Bug 25938 Author: jakub Date: Wed Feb 15 07:46:39 2006 New Revision: 111018 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=111018 Log: PR libgomp/25938 PR libgomp/25984 fortran/ * Make-lang.in (install-finclude-dir): New goal. (fortran.install-common): Depend on install-finclude-dir. * lang-specs.h: If not -nostdinc, add -I finclude. libgomp/ * Makefile.am (fincludedir): New variable. (nodist_include_HEADERS): Remove Fortran files. (nodist_finclude_HEADERS): New variable. * Makefile.in: Regenerated. Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/Make-lang.in trunk/gcc/fortran/lang-specs.h trunk/libgomp/ChangeLog trunk/libgomp/Makefile.am trunk/libgomp/Makefile.in
Only the fortran part of this bug is fixed. omp.h is still broken. Most likely what should be done is install omp.h inside the include directory where libobjc installs theirs.
Thanks, Jakub! I can confirm Andrew's findings: the Fortran include files are now fixed indeed. include/gomp.h is the only one remaining now!
RTH, Jakub, would you mind having a look at this regression?
This is a show-stopper; an installation problem like this would be embarassing.
Jakub, ping.
Working on a fix.
Subject: Bug 25938 Author: jsm28 Date: Sat Aug 26 18:30:44 2006 New Revision: 116475 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=116475 Log: PR libgomp/25938 * Makefile.am (libsubincludedir): New. (nodist_include_HEADERS): Rename to nodist_libsubinclude_HEADERS. * Makefile.in: Regenerate. Modified: trunk/libgomp/ChangeLog trunk/libgomp/Makefile.am trunk/libgomp/Makefile.in
Fixed.