From: Adam Conrad Date: Tue, 23 Apr 2024 16:23:00 +0000 (+0300) Subject: Install ld.so to slibdir instead of rtlddir to fix cross builds X-Git-Tag: archive/raspbian/2.28-10+rpi1+deb10u3^2~44 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=202a8da594eb286f3787400a456d880b14fb163f;p=glibc.git Install ld.so to slibdir instead of rtlddir to fix cross builds When installing a cross-libc purely for linking purposes but not runtime use, the linker shouldn't be installed in rtlddir, since we won't actually be USING it, and thus referencing the rtlddir path in libc.so ends up blowing up cross-compilers for no reason. Gbp-Pq: Topic any Gbp-Pq: Name local-rtlddir-cross.diff --- diff --git a/Makeconfig b/Makeconfig index f5e81bdf5..49b12eba5 100644 --- a/Makeconfig +++ b/Makeconfig @@ -146,7 +146,7 @@ inst_slibdir = $(install_root)$(slibdir) ifndef rtlddir rtlddir = $(slibdir) endif -inst_rtlddir = $(install_root)$(rtlddir) +inst_rtlddir = $(install_root)$(slibdir) # Prefix to put on files installed in $(libdir). For libraries `libNAME.a', # the prefix is spliced between `lib' and the name, so the linker switch diff --git a/Makerules b/Makerules index 0ec6596ea..e466973d8 100644 --- a/Makerules +++ b/Makerules @@ -1211,7 +1211,7 @@ $(inst_libdir)/libc.so: $(common-objpfx)format.lds \ cat $<; \ echo 'GROUP ( $(slibdir)/libc.so$(libc.so-version)' \ '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\ - ' AS_NEEDED (' $(rtlddir)/$(rtld-installed-name) ') )' \ + ' AS_NEEDED (' $(slibdir)/$(rtld-installed-name) ') )' \ ) > $@.new ifeq ($(patsubst gnu%,,$(config-os)),) echo 'INPUT ( AS_NEEDED ( -lmachuser -lhurduser ) )' >> $@.new