Tobias Burnus <bur...@net-b.de> writes:

> No, finding libgfortran.spec at compile time works - it is all about
> finding it at run time.

pardon me: AFAIK the spec files are *only* used by the compiler driver,
not at runtime of the resulting executables.

>> while my issue is about
>> finding the right (64-bit) libgcc_s.so.1 at runtime, due to a bug in the
>> construction of LD_LIBRARY_PATH in the testsuite.  This worked before
>> and is broken now, due to the libquadmath patch.
>
> I am not sure the bug is the same, but they are related. Both are about
> finding the .spec file at run time; once for the installed system and once

No, they are not: LD_LIBRARY_PATH is only relevant for finding shared
objects at runtime and completely irrelevant to the compiler driver's
search for .spec files.

> for the test-suite run. My plan is first to fix the first issue, namely
> where the compiler searches for the library and then to revisit the test
> suite issue.
>
> The changes made can be shown via:
>    svn diff -r166824:166825 gcc/testsuite/lib/gfortran.exp
>
> The changes are needed if the compiler is not installed, i.e. the libraries
> are only in the build directory. In this case "gfortran" (the driver) needs
> to be able to find the libgfortran.spec file based on the passed
> -L<dir>. The patch (cf. svn diff) is doing this, but seems to break the
> test suite in some cases.

>From a quick look, there seem to be several problems:

* libquadmath/.libs is added with -L and to LD_LIBRARY_PATH both if
  libquadmath.a and again if libquadmath.${shlib_ext} exist.  This would
  explain why we see the unnecessary doubling of libquadmath/.libs in
  LD_LIBRARY_PATH.

* Unfortunately, this doesn't take the multilib subdir into account,
  which is wrong for the non-default multilib.

* Something seems to have been broken wrt. to
  gcc-set-multilib-library-path since, as I wrote, gcc/amd64 isn't added
  to LD_LIBRARY_PATH, which breaks all execution tests for the
  non-default multilibs.

I'll further check what's going on here, adding a couple of log
statements to investigate.

        Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

Reply via email to