toolchain/musl: fix loongarch64 ldso file name
[openwrt/staging/nbd.git] / toolchain / musl / patches / 400-fix-loongarch64-ldso-file-name.patch
diff --git a/toolchain/musl/patches/400-fix-loongarch64-ldso-file-name.patch b/toolchain/musl/patches/400-fix-loongarch64-ldso-file-name.patch
new file mode 100644 (file)
index 0000000..a19ceb4
--- /dev/null
@@ -0,0 +1,10 @@
+--- a/Makefile
++++ b/Makefile
+@@ -218,6 +218,7 @@ $(DESTDIR)$(includedir)/%: $(srcdir)/inc
+ $(DESTDIR)$(LDSO_PATHNAME): $(DESTDIR)$(libdir)/libc.so
+       $(INSTALL) -D -l libc.so $@ || true
++      $(if $(filter loongarch64,$(ARCH)$(SUBARCH)),$(INSTALL) -D -l libc.so $(subst $(ARCH)$(SUBARCH).so.1,loongarch-lp64d.so.1,$@) || true)
+ install-libs: $(ALL_LIBS:lib/%=$(DESTDIR)$(libdir)/%) $(if $(SHARED_LIBS),$(DESTDIR)$(LDSO_PATHNAME),)