For Modula-2 build-tree testing, also set up paths to compiler libraries
authorThomas Schwinge <thomas@codesourcery.com>
Tue, 31 Jan 2023 10:38:15 +0000 (11:38 +0100)
committerThomas Schwinge <thomas@codesourcery.com>
Tue, 31 Jan 2023 22:28:12 +0000 (23:28 +0100)
commit94cacee20d817d0b937701b6759bb67dba3ee3f9
treeb73e5e39ef4e4093988b009412d9109ea12524ab
parentb2ec2504af77b35e748067eeb846821d12a6b6b4
For Modula-2 build-tree testing, also set up paths to compiler libraries

Currently, 'gcc/testsuite/lib/gm2.exp:gm2_link_flags' doesn't set up
paths to compiler libraries (such as libgcc, which libstdc++
may depend on).  For example, I see my x86_64-pc-linux-gnu '-m32' testing
not pick up the build-tree libgcc, but instead some random system one,
which (expectedly) doesn't satisfy requirements of other build-tree
libraries:

    [...]/build-gcc/gcc/testsuite/gm225/m.x0: /lib/i386-linux-gnu/libgcc_s.so.1: version `GCC_7.0.0' not found (required by [...]/build-gcc/x86_64-pc-linux-gnu/32/libstdc++-v3/src/.libs/libstdc++.so.6)

..., and thus a lot of execution FAILs.

As seen in a number of other '[...]_link_flags' procedures, the standard idiom
seems to be to also consider 'gcc-set-multilib-library-path' for
'ld_library_path'.

gcc/testsuite/
* lib/gm2.exp (gm2_link_flags) [$gccpath != ""]: Also consider
'gcc-set-multilib-library-path' for 'ld_library_path'.
gcc/testsuite/lib/gm2.exp