[Patch] gfortran.dg/dg.exp: Add libgfortran as -I flag for ISO*.h [PR101305] (was: [PATCH 3/3] [PR libfortran/101305] Fix ISO_Fortran_binding.h paths in gfortran testsuite)
Tobias Burnus
tobias@codesourcery.com
Wed Jul 28 11:22:53 GMT 2021
Hi Sandra, hi all,
On 28.07.21 06:36, Sandra Loosemore wrote:
> On 7/26/21 2:13 PM, Sandra Loosemore wrote:
>> On 7/26/21 3:45 AM, Tobias Burnus wrote:
>>> PS: Still, it would be nice if the proper multi-lib ISO*.h could be
>>> found;
(Example for x86-64-gnu-linux with 32bit and 64bit support)
Namely,
x86_64-pc-linux-gnu/libgfortran/ISO_Fortran_binding.h
x86_64-pc-linux-gnu/32/libgfortran/ISO_Fortran_binding.h
exist and they are different.
GCC finds the correct header, when running:
make check-fortran RUNTESTFLAGS="--target_board=unix\{-m32\}"
which runs gfortran with:
-B.../x86_64-pc-linux-gnu/32/libgfortran/
Likewise, with "-m32" replaced by "-m64" or "",
it works and gfortran is run with
-B.../x86_64-pc-linux-gnu/./libgfortran/
But when running both at the same time, i.e.
make check-fortran RUNTESTFLAGS="--target_board=unix\{,-m32\}"
(note the ',' before '-m32'), gfortran is run for
both "" (= -m64) and "-m32" with:
-B.../x86_64-pc-linux-gnu/./libgfortran/
That's fine for -m64 but for -m32 it finds the wrong
ISO_Fortran_binding.h file.
Solution:
Add a "-I" with the proper path to find the right *.h file.
'strace' confirms that the -I include path is searched before the
path provided by "-B".
[Note: I only did in-tree testing with that patch so far.]
Comments to the attached patch? Does it look OK?
* * *
> Unfortunately, I could not get this to work.
I think the attached version does work :-)
> For installed-tree testing, this resulted in diagnostics about a
> nonexistent directory on the include path. In my i686-pc-linux-gnu
> build I was having other problems when I tried build-tree testing using
>
> make check-gfortran RUNTESTFLAGS="--target-board=localhost/m64"
I have an x86-64-gnu-linux build and there I use
"--target_board=unix\{,-m32\}",
which seems to work fine and runs it first with "" (= -m64) and then
with -m32.
(See above.)
I also do not see any issues with xfailing.
> BTW, I can't find any documentation for what get_multilibs is supposed
> to do. It seems to be part of Dejagnu itself rather than the gcc test
> support?
Yes, but the documentation is, well, short:
https://www.gnu.org/software/dejagnu/manual/get_005fmultilibs-procedure.html
In the DejaGNU source code, there is a better description (comment before the function):
Cf. https://git.savannah.gnu.org/gitweb/?p=dejagnu.git;a=blob;f=lib/libgloss.exp;;hb=HEAD#l389
Tobias
-----------------
Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dg-ISO-find.diff
Type: text/x-patch
Size: 1417 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20210728/301fe5d7/attachment-0001.bin>
More information about the Gcc-patches
mailing list