Hi Sandra,

On 23.07.21 22:43, Sandra Loosemore wrote:
On 7/23/21 8:15 AM, Tobias Burnus wrote:
On 21.07.21 12:17, Tobias Burnus wrote:
On 13.07.21 23:28, Sandra Loosemore wrote:
ISO_Fortran_binding.h is now generated in the libgfortran build
directory where it is on the default include path.  Adjust includes
[...]
Unfortunately, that does not help.
It seems as if the following works in the *.exp file:
[...]
I'm not seeing the include path failures Tobias is seeing, [...] why
this isn't working for Tobias.  :-S

I also do not have any idea – I did bootstrap before into an empty directory
and I don't think I had other patches applied.

I have no idea why it did not work – nor why it now works. I did now (again?):

* Reset all patches + re-apply your three patches
* Bootstrap into an empty directory with
  $ ..../configure --prefix=... --enable-multiarch 
--enable-languages=c,c++,fortran,lto,objc
  $ make -j12 && make install
  $ cd gcc
  $ make check-fortran RUNTESTFLAGS="dg.exp=ISO_Fortran_binding_1.f90 
--target_board=unix\{,-m32\}"

and now I got:
                === gfortran Summary for unix ===
# of expected passes            12
                === gfortran Summary for unix/-m32 ===
# of expected passes            12

Thus, it (mostly) works.
(I also did a more complete 'make check-fortran' run.)

 * * *

I did say that it mostly works because of:

$ find x86_64-pc-linux-gnu/ -name ISO_Fortran_binding.h
x86_64-pc-linux-gnu/libgfortran/ISO_Fortran_binding.h
x86_64-pc-linux-gnu/32/libgfortran/ISO_Fortran_binding.h

And when looking at the -B lines, I see for the '' alias '-m64' run:
-B.../build/gcc/testsuite/gfortran/../../
-B.../build/x86_64-pc-linux-gnu/./libgfortran/
-B.../build/x86_64-pc-linux-gnu/./libgfortran/.libs
-B.../build/x86_64-pc-linux-gnu/./libquadmath/.libs

which is fine (second line ensures the ISO*.h file is found.)

But for -m32, I see:

-B.../build/gcc/testsuite/gfortran/../../
-B.../build/x86_64-pc-linux-gnu/./libgfortran/
-B.../build/x86_64-pc-linux-gnu/32/libgfortran/.libs
-B.../build/x86_64-pc-linux-gnu/32/libquadmath/.libs

That also works, but it uses again the same directory for ISO*.h,
such that the -m64 header file is used instead of the -m32 one.

 * * *

I am not sure whether it really matters – the differences between
the header files is (on x86-64-gnu-linux):

-#define CFI_type_int128_t (CFI_type_Integer + (16 << CFI_type_kind_shift))
-#define CFI_type_int_least128_t (CFI_type_Integer + (16 << 
CFI_type_kind_shift))
-#define CFI_type_int_fast128_t (CFI_type_Integer + (16 << CFI_type_kind_shift))
+#define CFI_type_int128_t -2
+#define CFI_type_int_least128_t -2
+#define CFI_type_int_fast128_t -2

There might be larger differences on other multi-arch systems, but at least
for x86-64, it seems to be harmless. (-2 = not available).

For instance, there might be an issue on Windows. (I keep forgetting what
sizeof(long) is with -m64 – is is the same as sizeof(int) as with -m32?
Or is it 64bit with -m64?)

 * * *

Thus, I am puzzled why it failed before and not longer. But given that it
works now:

LGTM, thanks for the patch and sorry for the confusion!

Tobias

PS: Still, it would be nice if the proper multi-lib ISO*.h could be found;
while it usually does not matter, it could do so in some cases.

-----------------
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

Reply via email to