This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: RFC: Should we link dynamic tests to use the newly built glibcdirctly
On Mon, 8 Oct 2012, H.J. Lu wrote:
> Even if we do this, we still need to set DT_RPATH and PT_INTERP
> as well as some environment variables to the staging directory.
> Otherwise, we can't run tests directly using the newly built glibc.
Setting the interpreter is unavoidable. Using a staging installation
would simplify the RPATH settings (only the lib and usr/lib or lib64 and
usr/lib64 directories there, not a load of separate bits of the build
tree). And in <http://sourceware.org/ml/libc-alpha/2012-04/msg00089.html>
I suggested adding support to glibc for a new GLIBC_SYSROOT environment
variable, which could avoid the need to set any of the other environment
variables.
I think setting the interpreter, and adding support for GLIBC_SYSROOT,
gets us as close as possible to test programs running like they would if
run with glibc installed directly in the root filesystem.
(There's a separate build-side issue: ideally most tests would be built
with installed libraries and headers - with --sysroot, except that may not
work at present with a compiler / linker not configured to use a sysroot.
Only the limited subset of tests with some genuine need for glibc-internal
headers - some that are deliberately testing internal macros, such as
csu/tst-atomic.c, for example - should actually be built with them, I
think; otherwise it's best to test the same interfaces glibc users get
when building programs with an installed library in the normal way.)
--
Joseph S. Myers
joseph@codesourcery.com