toolchain/crosstool-NG: fix copying the dynamic linker
cover toolchain/crosstool-NG: fix copying the dynamic linker
Hello All!
Depending on some configurations (arch? bitness? others? combination of many settings?...), the dynamic linker can get different names.
This patch implements a crude /heuristic/ to copy ld.so (see patch commit message). It is copied from the standard external toolchain code, so should behave the same wrt ld.so ( and we know that external toolchain does work, don't we? ;-) ).
[PATCH] toolchain/crosstool-NG: correctly copy the dynamic linker
Thanks to Ettore Campion for being stubborn, and providing some dumps of its output files. Cheers! ;-)
Regards,
Yann E. MORIN.
PS. Ettore, sorry for the dups, I'm having issues with my mails. PEBCAK...
PATCH 1/1 toolchain/crosstool-NG: correctly copy the dynamic linker
Depending on some setting (which? Arch? Others?), the dynamic linker can get different names. Some times, it is named ld-linux.something.so, other times, it is ld.so.1, and maybe other variants as well...
The fix is to always copy ls*.so, even if it is a symlink: we create the destination file by its SONAME, and if ld*.so matches more than one file, that's no issue, as they would all get the same SONAME (being symlinks ones to the others).
Split long lines at the same time.
--- toolchain/toolchain-crosstool-ng/crosstool-ng.mk | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-)
toolchain/toolchain-crosstool-ng/crosstool-ng.mk +4 -3
@@ -36,13 +36,14 @@ endef #-------------- # The generic system libraries (in /lib) -CTNG_LIBS_LIB := libc.so libcrypt.so libdl.so libgcc_s.so libm.so libnsl.so libpthread.so libresolv.so librt.so libutil.so +CTNG_LIBS_LIB := ld*.so libc.so libcrypt.so libdl.so libgcc_s.so libm.so \ + libnsl.so libpthread.so libresolv.so librt.so libutil.so #-------------- # The libc-specific system libraries (in /lib) # Note: it may be needed to tweak the NSS libs in the glibc and eglibc cases... -CTNG_LIBS_uClibc := ld-uClibc.so -CTNG_LIBS_glibc := ld-linux.so libnss_files.so libnss_dns.so +CTNG_LIBS_uClibc := +CTNG_LIBS_glibc := libnss_files.so libnss_dns.so CTNG_LIBS_eglibc := $(CTNG_LIBS_glibc) #--------------
Signature · 1 line
1.7.2.3
PATCH 1/1 toolchain/crosstool-NG: correctly copy the dynamic linker
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Yann" == Yann E MORIN <[email protected]> writes:
Yann> Depending on some setting (which? Arch? Others?), the dynamic linker Yann> can get different names. Some times, it is named ld-linux.something.so, Yann> other times, it is ld.so.1, and maybe other variants as well...
Yann> The fix is to always copy ls*.so, even if it is a symlink: we create Yann> the destination file by its SONAME, and if ld*.so matches more than Yann> one file, that's no issue, as they would all get the same SONAME (being Yann> symlinks ones to the others).
Committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard