From: GNU Libc Maintainers Date: Wed, 30 Apr 2025 01:01:35 +0000 (+0800) Subject: local-ld-multiarch X-Git-Tag: archive/raspbian/2.31-13+rpi1+deb11u12^2~26 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=b1351b5186ff33f09d2248829f613b5bb05314d3;p=glibc.git local-ld-multiarch 2012-05-01 Aurelien Jarno * elf/Makefile(trusted-dirs.st): Fix DL_DST_LIB computation with two level slibdir directories. 2009-09-08 Aurelien Jarno * Makeconfig: add support for multiarch compat directories. Gbp-Pq: Topic any Gbp-Pq: Name local-ld-multiarch.diff --- diff --git a/Makeconfig b/Makeconfig index 426424d47..7c275d3d8 100644 --- a/Makeconfig +++ b/Makeconfig @@ -152,6 +152,11 @@ libdir = $(exec_prefix)/lib endif inst_libdir = $(install_root)$(libdir) +# Compat places to look for libraries +ifndef extra_libdir +extra_libdir = /lib:$(exec_prefix)/lib +endif + # Where to install the shared library. ifndef slibdir slibdir = $(exec_prefix)/lib @@ -620,6 +625,10 @@ else default-rpath = $(libdir) endif +ifdef extra_libdir +default-rpath += :$(extra_libdir) +endif + ifndef link-extra-libs link-extra-libs = $(LDLIBS-$(@F)) link-extra-libs-static = $(link-extra-libs) diff --git a/elf/Makefile b/elf/Makefile index 2c7e47135..5b52d30cd 100644 --- a/elf/Makefile +++ b/elf/Makefile @@ -568,7 +568,7 @@ $(objpfx)trusted-dirs.st: Makefile $(..)Makeconfig $(make-target-directory) echo "$(subst :, ,$(default-rpath) $(user-defined-trusted-dirs))" \ | $(AWK) -f gen-trusted-dirs.awk > ${@:st=T}; - echo '#define DL_DST_LIB "$(notdir $(slibdir))"' >> ${@:st=T} + echo '#define DL_DST_LIB "$(shell echo $(slibdir) | sed 's,/,,')"' >> ${@:st=T} $(move-if-change) ${@:st=T} ${@:st=h} touch $@ CPPFLAGS-dl-load.c += -I$(objpfx). -I$(csu-objpfx).