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

Joseph S. Myers joseph@codesourcery.com
Tue Apr 3 19:01:00 GMT 2012


On Tue, 3 Apr 2012, Siddhesh Poyarekar wrote:

> How about if we run `built/ld.so --list <built-file>` to find
> dependencies (allowing the indiscretion of having a fallback into
> system libraries), and then use that information to symlink the extra
> libraries into, say, $(builddir)/tests/lib/? That way the actual test
> runs will be completely isolated, especially if we disable ld.so.cache
> lookups in the dynamic linker.

The libraries may not be in standard system directories.  Suppose for 
example you have GCC (built elsewhere, say) installed into nonstandard 
directories with 32-bit libgcc_s and libstdc++ on an otherwise purely 
64-bit x86_64 system, and are using that GCC to build 32-bit libc.  The 
required shared libraries for testing exist, and that GCC can find them, 
but ld.so --list won't find them.  Testing in this case still ought to 
work.

-- 
Joseph S. Myers
joseph@codesourcery.com



More information about the Libc-alpha mailing list