From c000373a084d5380c17d81e79b829c4ebd677226 Mon Sep 17 00:00:00 2001
From: Mateusz Tabaka <tab.debugteam@gmail.com>
Date: Tue, 29 Sep 2020 00:08:11 +0200
Subject: [PATCH] Add symlink from libc.so to libc.so.6

Typically it's the other way around, but we can't have shared library named libc.so.6 in target/release directory.
cargo includes 'target/release' in LD_LIBRARY_PATH for build script, so even if clean build runs fine,
every subsquent run will make build script link with relibc.
---
 Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Makefile b/Makefile
index d1381ab4..1834aa6d 100644
--- a/Makefile
+++ b/Makefile
@@ -86,6 +86,7 @@ install-libs: libs
 	mkdir -pv "$(DESTDIR)/lib"
 	cp -v "$(BUILD)/release/libc.a" "$(DESTDIR)/lib"
 	cp -v "$(BUILD)/release/libc.so" "$(DESTDIR)/lib"
+	ln -sr "$(DESTDIR)/lib/libc.so" "$(DESTDIR)/lib/libc.so.6"
 	cp -v "$(BUILD)/release/crt0.o" "$(DESTDIR)/lib"
 	cp -v "$(BUILD)/release/crti.o" "$(DESTDIR)/lib"
 	cp -v "$(BUILD)/release/crtn.o" "$(DESTDIR)/lib"
-- 
GitLab