Install ld.so to slibdir instead of rtlddir to fix cross builds
authorAdam Conrad <adconrad@ubuntu.com>
Tue, 15 Mar 2022 22:48:49 +0000 (22:48 +0000)
committerAurelien Jarno <aurel32@debian.org>
Tue, 15 Mar 2022 22:48:49 +0000 (22:48 +0000)
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

Makeconfig
Makerules

index f5e81bdf5d8aae3b70ee8d00148432cc67ab3414..49b12eba55d2fdf4a9735660f2617d800d2995c3 100644 (file)
@@ -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
index 0ec6596ea1f1f20a1965a254538cc9f3498514b6..e466973d853510d264413eb979bc508e3fc113ff 100644 (file)
--- 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