[2/4] Makefile: Add ld.so.conf with libgcc dir to testroot.pristine

Message ID 20250122161338.141291-3-dilfridge@gentoo.org (mailing list archive)
State Superseded
Headers
Series [1/4] Makeconfig: Add libgcc directory to rtld-prefix search path |

Checks

Context Check Description
redhat-pt-bot/TryBot-apply_patch success Patch applied to master at the time it was sent
linaro-tcwg-bot/tcwg_glibc_build--master-aarch64 success Build passed
linaro-tcwg-bot/tcwg_glibc_check--master-aarch64 success Test passed
linaro-tcwg-bot/tcwg_glibc_build--master-arm success Build passed
linaro-tcwg-bot/tcwg_glibc_check--master-arm success Test passed

Commit Message

Andreas K. Huettel Jan. 22, 2025, 4:12 p.m. UTC
  From: Andreas K. Hüttel <dilfridge@gentoo.org>

Also provide a subdirectory ld.so.conf.d for drop-in configuration

Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
---
 Makefile | 5 +++++
 1 file changed, 5 insertions(+)
  

Patch

diff --git a/Makefile b/Makefile
index 97b4328af8..cb927fb9f9 100644
--- a/Makefile
+++ b/Makefile
@@ -634,6 +634,11 @@  $(objpfx)testroot.pristine/install.stamp :
 	cp $(objpfx)support/shell-container $(objpfx)testroot.pristine/bin/sh
 	cp $(objpfx)support/echo-container $(objpfx)testroot.pristine/bin/echo
 	cp $(objpfx)support/true-container $(objpfx)testroot.pristine/bin/true
+	# We need to be able to load extra language libraries.
+	mkdir -p $(objpfx)testroot.pristine/etc/ld.so.conf.d
+	echo 'include ld.so.conf.d/*.conf' > $(objpfx)testroot.pristine/etc/ld.so.conf
+	echo $(gnulib-extralibdir) >> $(objpfx)testroot.pristine/etc/ld.so.conf
+	echo '# file without content' > $(objpfx)testroot.pristine/etc/ld.so.conf.d/999-empty.conf
 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  \