[PATCH] Append system library paths to environment for test programs

Siddhesh Poyarekar siddhesh@redhat.com
Mon Apr 2 05:02:00 GMT 2012


Hi,

A bunch of tests fail on my system due to not being able to find some
libraries (libgcc_s.so, libstdc++.so). I found that this is because I
have a 64-bit Fedora install, which puts these libraries in /lib64
and /usr/lib64 instead of the usual /lib and /usr/lib. The current
--library-path for ld.so in the test cases ends up including only the
libraries in the build and those that may have been mentioned in
LDFLAGS.

To fix these tests on my box, I have written a small fix to Makeconfig
that appends search paths used by gcc (if we are using gcc) to the
--library-path of the dynamic linker command that invokes the tests.

I have verified that the libc libraries being tested are not being
overridden by the default paths. An example of a test that fails with
this is dlfcn/bug-atexit3.c. There are many more similar tests that
fail without this fix:

./nptl/tst-cancelx20:
./nptl/tst-cancelx12:
./nptl/tst-cancelx5:
./nptl/tst-cleanupx3:
./nptl/tst-cancelx18:
./nptl/tst-cancelx11:
./nptl/tst-oncex3:
./nptl/tst-cancelx9:
./nptl/tst-cleanupx1:
./nptl/tst-oncex4:
./nptl/tst-cancelx8:
./nptl/tst-cancelx17:
./nptl/tst-cancelx15:
./nptl/tst-cancelx16:
./nptl/tst-cancelx4:
./nptl/tst-cleanupx4:
./nptl/tst-cancel24:
./nptl/tst-cleanupx0:
./nptl/tst-cancelx21:
./nptl/tst-cancelx13:
./nptl/tst-cancelx10:
./nptl/tst-cancelx14:
./rt/tst-mqueue8x:

Regards,
Siddhesh

ChangeLog:

2012-04-02  Siddhesh Poyarekar  <siddhesh@redhat.com>

	* Makeconfig: Add paths searched by gcc to --library-path of
	dynamic linker when running built programs from within the
	search directory.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Append-system-library-paths-to-environment-for-test-.patch
Type: text/x-patch
Size: 956 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20120402/6ec89b39/attachment.bin>


More information about the Libc-alpha mailing list