This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [patch,libgomp] Make libgomp Fortran modules multilib-aware
- From: Jakub Jelinek <jakub at redhat dot com>
- To: FX <fxcoudert at gmail dot com>
- Cc: Jack Howarth <howarth dot at dot gcc at gmail dot com>, GCC Development <gcc at gcc dot gnu dot org>, Richard Henderson <rth at redhat dot com>
- Date: Tue, 31 May 2016 15:47:15 +0200
- Subject: Re: [patch,libgomp] Make libgomp Fortran modules multilib-aware
- Authentication-results: sourceware.org; auth=none
- References: <4795FF84-EC6B-448F-991E-AAA8948D5EE4 at gmail dot com> <CAJMcOU-k8ni+y05YH6CaxH3KAmHNjSYkXAqs-NYPWaNztK+Xtw at mail dot gmail dot com> <93D9F5BF-2BFD-4DC9-957E-EB3CAA41E7D9 at gmail dot com> <904796F1-1527-4424-8425-22592F65B075 at gmail dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Tue, May 31, 2016 at 03:36:14PM +0200, FX wrote:
> Richard, Jakub, or any global write maintainer: can I get a review on this one-word patch?
>
> ------------------
>
> The attached patch allows libgomp to install its Fortran modules in the correct multilib-aware directories, just like libgfortran does.
> Without it, multilib Fortran OpenMP code using the modules fails to compile because the modules are not found:
>
> $ gfortran -fopenmp a.f90
> $ gfortran -fopenmp a.f90 -m32
> a.f90:1:6:
>
> use omp_lib
> 1
> Fatal Error: Can't open module file âomp_lib.modâ for reading at (1): No such file or directory
> compilation terminated.
Why? It should look for it first in 32/finclude, sure, but if not found,
should fall back to finclude dir, where it is found.
Does it differ between 32-bit and 64-bit compilation?
> Bootstrapped and tested on x86_64-apple-darwin15. OK to commit?
> 2016-05-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
>
> PR libgomp/60670
> * Makefile.am: Make fincludedir multilib-aware.
> * Makefile.in: Regenerate.
> Index: libgomp/Makefile.am
> ===================================================================
> --- libgomp/Makefile.am (revision 235843)
> +++ libgomp/Makefile.am (working copy)
> @@ -10,7 +10,7 @@ config_path = @config_path@
> search_path = $(addprefix $(top_srcdir)/config/, $(config_path)) $(top_srcdir) \
> $(top_srcdir)/../include
>
> -fincludedir = $(libdir)/gcc/$(target_alias)/$(gcc_version)/finclude
> +fincludedir = $(libdir)/gcc/$(target_alias)/$(gcc_version)$(MULTISUBDIR)/finclude
> libsubincludedir = $(libdir)/gcc/$(target_alias)/$(gcc_version)/include
>
> vpath % $(strip $(search_path))
Jakub