local-ld-multiarch
authorGNU Libc Maintainers <debian-glibc@lists.debian.org>
Sat, 30 Sep 2023 08:31:05 +0000 (09:31 +0100)
committerAurelien Jarno <aurel32@debian.org>
Sat, 30 Sep 2023 08:31:05 +0000 (09:31 +0100)
2012-05-01  Aurelien Jarno  <aurelien@aurel32.net>

* elf/Makefile(trusted-dirs.st): Fix DL_DST_LIB computation with
two level slibdir directories.

2009-09-08  Aurelien Jarno  <aurelien@aurel32.net>

* Makeconfig: add support for multiarch compat directories.

Gbp-Pq: Topic any
Gbp-Pq: Name local-ld-multiarch.diff

Makeconfig
elf/Makefile

index 9dd058e04bdf7e706442a4721eb5f4cb06778812..239d0ff34d42f431c4ee1e4bac76daad62861316 100644 (file)
@@ -153,6 +153,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
@@ -631,6 +636,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)
index 30c9af1de978f9d6752dfc71613e3c1ae4ea57dc..03f63c3bc6ae9516307fd9137b2dbc1d57c64746 100644 (file)
@@ -1370,7 +1370,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).