]> git.ipfire.org Git - thirdparty/gcc.git/commit
gfortran: Fix in-build-tree testing [PR101305, PR101660]
authorTobias Burnus <tobias@codesourcery.com>
Thu, 12 Aug 2021 02:18:42 +0000 (19:18 -0700)
committerSandra Loosemore <sandra@codesourcery.com>
Thu, 19 Aug 2021 17:46:11 +0000 (10:46 -0700)
commit0a8af79817f5c633543d2aa32f4f0385af4cf22c
treecbf47bc37d61de00e356af835c87c66bedf1dae9
parentd2b1fbc8a159a465ce6114723301721808972a6e
gfortran: Fix in-build-tree testing [PR101305, PR101660]

ISO_Fortran_binding.h is written in the build dir - hence, a previous commit
added it as include directory for in-build-tree testing.  However,
it turned out that -I$specdir/libgfortran interferes with reading .mod files
as they are then no longer regareded as intrinsic modules.  Solution: Create
an extra include/ directory in the libgfortran build dir and copy
ISO_Fortran_binding.h to that directory.  As -B$specdir/libgfortran already
causes gfortran to read that include subdirectory, the -I flag is no longer
needed.

PR libfortran/101305
PR fortran/101660
PR testsuite/101847

libgfortran/ChangeLog:

* Makefile.am (ISO_Fortran_binding.h): Create include/ in the build dir
and copy the include file to it.
(clean-local): Add for removing the 'include' directory.
* Makefile.in: Regenerate.

gcc/testsuite/ChangeLog:

* lib/gfortran.exp (gfortran_init): Remove -I$specpath/libgfortran
from the string used to set GFORTRAN_UNDER_TEST.

(cherry picked from commit 2ba0376ac40447ce7ee09fcef00511c18db25dfa)
gcc/testsuite/ChangeLog.omp
gcc/testsuite/lib/gfortran.exp
libgfortran/ChangeLog.omp
libgfortran/Makefile.am
libgfortran/Makefile.in