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

David Miller davem@davemloft.net
Tue Apr 3 06:36:00 GMT 2012


From: Siddhesh Poyarekar <siddhesh@redhat.com>
Date: Tue, 3 Apr 2012 11:04:47 +0530

> My suggestion is:
> 
> BUNCH_OF_ENV_VARIABLES /path/to/my/ld.so \
> --library-path=MY:BUILT:LIBS:gcc:libs \
> testcase {test case args} > testcase.out

Whilst I agree with you that if we build with compiler X we should
consider very strongly accounting for the shared library dependencies
implicitly generated by compiler X.

However, I still think this is strength in Carlos's assertion that if
you are building for a particular sysroot that sysroot should be
populated with the necessary dependencies.

Ie. it should be usable if one were to chroot into the sysroot
directory and try to execute programs.  And that's not true in your
situation since the shared libgcc won't be there.

I also think the whole ld.so.cache thing is a scarecrow and not the
main issue.  It would even be more logical to talk about
SYSROOT/etc/ld.so.conf instead, since that should be in your sysroot
to direct the dynamic linker where to find libraries.

On my system it lists /lib/sparc-linux-gnu and /lib64 which are where
the 32-bit and 64-bit shared libgcc are obtained from, respectively.



More information about the Libc-alpha mailing list