From 5dc316cbba4084cbbd9134bf72cca6ea41677a27 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Sat, 18 May 2019 22:41:48 -0400 Subject: build: Put *.so links in a versioned directory --- (limited to 'build') diff --git a/build b/build index 0ee0cee..64c0d5f 100755 --- a/build +++ b/build @@ -204,6 +204,13 @@ install-native: # Put libgcc_s.so.* under /lib. mkdir -p $(destdir)/lib/$(OPK_HOST_ARCH) mv $(destdir)$(libdir)/libgcc_s.so.* $(destdir)/lib/$(OPK_HOST_ARCH) + # Put *.so links in a versioned directory. We want links to + # libfoo.so.x, not libfoo.x.y.z as libtool generates. + set -e; \ + for link in $(destdir)$(libdir)/*.so; do \ + ln -sf $$(ls $${link}.* | sed 's|^$(destdir)||; q;') \ + $(destdir)$(tgtlibdir)/$${link##*/}; \ + done # Remove libitm files. rm -f $(destdir)$(libdir)/libitm.* # Remove libquadmath files. -- cgit v0.9.1