As we discussed some time ago, adding symlinks like

  libfoo.so -> libfoo.so.x.y

brings us more in line with other ELF platforms and will allow us to
drop some OpenBSD-specific code from our linkers.  It also makes it
possible for developers to easily revert a library version bump.

The symlinks will need to be added to sets of course after this goes
in.  Since the symlinks are there primarily for the sake of the
linker, it makes sense to add these symlinks to comp.tgz.

ok?


Index: share/mk/bsd.lib.mk
===================================================================
RCS file: /cvs/src/share/mk/bsd.lib.mk,v
retrieving revision 1.92
diff -u -p -r1.92 bsd.lib.mk
--- share/mk/bsd.lib.mk 14 Nov 2017 10:02:56 -0000      1.92
+++ share/mk/bsd.lib.mk 3 May 2018 21:02:43 -0000
@@ -287,6 +287,9 @@ realinstall:
 .if !defined(NOPIC) && defined(SHLIB_MAJOR) && defined(SHLIB_MINOR)
        ${INSTALL} ${INSTALL_COPY} -S -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
            ${FULLSHLIBNAME} ${DESTDIR}${LIBDIR}
+       ln -sf ${DESTDIR}${LIDIR}${FULLSHLIBNAME} \
+           ${DESTDIR}${LIBDIR}/lib${LIB}.so
+       chown -h ${LIBOWN}:${LIBGRP} ${DESTDIR}${LIBDIR}/lib${LIB}.so
 .if defined(LIBREBUILD)
        ${INSTALL} -d -o ${LIBOWN} -g ${LIBGRP} -m 755 \
           ${DESTDIR}/usr/share/relink/${LIBDIR}

Reply via email to