mirror of
git://sourceware.org/git/glibc.git
synced 2024-11-27 03:41:23 +08:00
test-container: disable ld.so system cache on DSO detection
When building the testroot, the script runs the newly built ld.so on a
couple of binaries in order to copy over any additional libraries
needed. However, if the dependencies are found in the system cache, it
will be copied over using that path.
This is problematic if the system ld.so and the one built don't have the
exact same search configuration. We encountered this in Ubuntu, where we
build a variant of libc with -fno-omit-frame-pointer for accurate
performance profiling.
This variant is built using a non-standard slibdir to be able to be
co-installed with the default library (e.g. slibdir = /lib/libc6-prof).
Since we have /lib pointing to /usr/lib, any additional dependency
should still be reachable via /usr. However, resolving via the cache
might result in the additional DSOs being copied into $testroot/lib, out
of the search path in the container.
The problem has been triggered by 1d5024f4f0
("support: Build with exceptions and asynchronous unwind tables [BZ #30587]")
which introduced a dependency on libgcc_s.so.1 under some circumstances.
Downstream bug: https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/2031495
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
This commit is contained in:
parent
31aaf6fed9
commit
97290559c3
4
Makefile
4
Makefile
@ -624,7 +624,7 @@ $(objpfx)testroot.pristine/install.stamp :
|
||||
ifeq ($(run-built-tests),yes)
|
||||
# Copy these DSOs first so we can overwrite them with our own.
|
||||
for dso in `$(test-wrapper-env) LD_TRACE_LOADED_OBJECTS=1 \
|
||||
$(rtld-prefix) \
|
||||
$(rtld-prefix) --inhibit-cache \
|
||||
$(objpfx)testroot.pristine/bin/sh \
|
||||
| sed -n '/\//{s@.*=> /@/@;s/^[^/]*//;s/ .*//p;}'` ;\
|
||||
do \
|
||||
@ -633,7 +633,7 @@ ifeq ($(run-built-tests),yes)
|
||||
$(test-wrapper) cp $$dso $(objpfx)testroot.pristine$$dso ;\
|
||||
done
|
||||
for dso in `$(test-wrapper-env) LD_TRACE_LOADED_OBJECTS=1 \
|
||||
$(rtld-prefix) \
|
||||
$(rtld-prefix) --inhibit-cache \
|
||||
$(objpfx)support/$(LINKS_DSO_PROGRAM) \
|
||||
| sed -n '/\//{s@.*=> /@/@;s/^[^/]*//;s/ .*//p;}'` ;\
|
||||
do \
|
||||
|
Loading…
Reference in New Issue
Block a user