summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2019-05-18 22:41:48 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2019-05-18 22:41:48 (EDT)
commit5dc316cbba4084cbbd9134bf72cca6ea41677a27 (patch)
tree215d2c725f2ee4c2f3027490f4cdd51b040ee393 /build
parent637aa5a05e4bd88a78aeb73da0babbfa650b8442 (diff)
build: Put *.so links in a versioned directory
Diffstat (limited to 'build')
-rwxr-xr-xbuild7
1 files changed, 7 insertions, 0 deletions
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.