From c3d67d6cf0b78c19bcd65a3928f6ba0e6d6140bd Mon Sep 17 00:00:00 2001 From: Alex Richardson Date: Mon, 12 Oct 2020 10:42:19 +0000 Subject: [PATCH] Don't use install(1) for the library symlinks in the build directory It appears this was changed from ln to use install in rS245752. I noticed this because my buildenv was setting INSTALL=install -U -M //METALOG and then these links fail to be created with the following error: install: open //METALOG: Permission denied Reviewed By: brooks Differential Revision: https://reviews.freebsd.org/D26618 --- share/mk/bsd.lib.mk | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk index 9997bfa979df..dca5d80da3a5 100644 --- a/share/mk/bsd.lib.mk +++ b/share/mk/bsd.lib.mk @@ -312,7 +312,8 @@ ${SHLIB_NAME_FULL}: ${SOBJS} @${ECHO} building shared library ${SHLIB_NAME} @rm -f ${SHLIB_NAME} ${SHLIB_LINK} .if defined(SHLIB_LINK) && !commands(${SHLIB_LINK:R}.ld) && ${MK_DEBUG_FILES} == "no" - @${INSTALL_LIBSYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} ${SHLIB_NAME} ${SHLIB_LINK} + # Note: This uses ln instead of ${INSTALL_LIBSYMLINK} since we are in OBJDIR + @${LN:Uln} -fs ${SHLIB_NAME} ${SHLIB_LINK} .endif ${_LD:N${CCACHE_BIN}} ${LDFLAGS} ${SSP_CFLAGS} ${SOLINKOPTS} \ -o ${.TARGET} -Wl,-soname,${SONAME} ${SOBJS} ${LDADD} @@ -326,7 +327,8 @@ ${SHLIB_NAME}: ${SHLIB_NAME_FULL} ${SHLIB_NAME}.debug ${OBJCOPY} --strip-debug --add-gnu-debuglink=${SHLIB_NAME}.debug \ ${SHLIB_NAME_FULL} ${.TARGET} .if defined(SHLIB_LINK) && !commands(${SHLIB_LINK:R}.ld) - @${INSTALL_LIBSYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} ${SHLIB_NAME} ${SHLIB_LINK} + # Note: This uses ln instead of ${INSTALL_LIBSYMLINK} since we are in OBJDIR + @${LN:Uln} -fs ${SHLIB_NAME} ${SHLIB_LINK} .endif ${SHLIB_NAME}.debug: ${SHLIB_NAME_FULL}