summaryrefslogtreecommitdiffstats
path: root/toolchain/musl
diff options
context:
space:
mode:
authorWeijie Gao <hackpascal@gmail.com>2024-04-18 00:08:24 +0800
committerChuanhong Guo <gch981213@gmail.com>2024-05-04 14:12:56 +0800
commit197d90dc31741a5510cd2218eff0befa935312cd (patch)
treed532e39aeb0700071aecd30dbd59bf39bd799adb /toolchain/musl
parentc5946c07241272361da702b5eebd5f887b8a68c1 (diff)
downloadopenwrt-197d90dc31741a5510cd2218eff0befa935312cd.tar.gz
openwrt-197d90dc31741a5510cd2218eff0befa935312cd.tar.bz2
openwrt-197d90dc31741a5510cd2218eff0befa935312cd.zip
toolchain/musl: fix loongarch64 ldso file name
GCC has changed musl dynamic linker name from ld-musl-loongarch-lp64d.so.1 to ld-musl-loongarch64.so.1 recently [1]. This means there are two dynamic linker names will be used across different ersions of GCC. But musl 1.2.5 only supports the new name while the GCC we're currently using uses the old name. To maintain compatibility with all versions of GCC, the musl is then patched to generate two symbolic links to libc.so with both old and new names. [1] https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=8bccee51f0deac64b79cd9ad75df599422f4c8ff Signed-off-by: Weijie Gao <hackpascal@gmail.com>
Diffstat (limited to 'toolchain/musl')
-rw-r--r--toolchain/musl/patches/400-fix-loongarch64-ldso-file-name.patch10
1 files changed, 10 insertions, 0 deletions
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
index 0000000000..a19ceb4583
--- /dev/null
+++ b/toolchain/musl/patches/400-fix-loongarch64-ldso-file-name.patch
@@ -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),)
+