Install ld.so to slibdir instead of rtlddir to fix cross builds
authorAdam Conrad <adconrad@ubuntu.com>
Mon, 13 Jul 2020 19:34:17 +0000 (20:34 +0100)
committerAurelien Jarno <aurel32@debian.org>
Mon, 13 Jul 2020 19:34:17 +0000 (20:34 +0100)
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 f252842979a1d777e0f0c2bdafa7a65aee0805cd..33c2f317389fe7b728fa90e58e19d1e84812c248 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 10aa5790c4c06e4471a9815a2dfc3340c52b9791..f70acb169b0670a80c694a1462fdf8068cb975b7 100644 (file)
--- a/Makerules
+++ b/Makerules
@@ -1141,7 +1141,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