diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk index 51fb828400a2..4a8fe89196db 100644 --- a/share/mk/bsd.lib.mk +++ b/share/mk/bsd.lib.mk @@ -235,7 +235,6 @@ ${SHLIB_NAME_FULL}: beforelinking ${SHLIB_LINK:R}.ld: ${.CURDIR}/${SHLIB_LDSCRIPT} sed -e 's,@@SHLIB@@,${_LDSCRIPTROOT}${_SHLIBDIR}/${SHLIB_NAME},g' \ -e 's,@@LIBDIR@@,${_LDSCRIPTROOT}${_LIBDIR},g' \ - -e 's,/[^ ]*/,,g' \ ${.ALLSRC} > ${.TARGET} ${SHLIB_NAME_FULL}: ${SHLIB_LINK:R}.ld @@ -339,6 +338,9 @@ _SHLINSTALLFLAGS:= ${_SHLINSTALLFLAGS${ie}} .if !defined(INTERNALLIB) realinstall: _libinstall .ORDER: beforeinstall _libinstall +.if target(${SHLIB_LINK:R}.ld) +_libinstall: ${SHLIB_LINK:R}.ld +.endif _libinstall: .if defined(LIB) && !empty(LIB) && ${MK_INSTALLLIB} != "no" ${INSTALL} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ @@ -365,6 +367,7 @@ _libinstall: ${INSTALL} -S -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ ${_INSTALLFLAGS} ${SHLIB_LINK:R}.ld \ ${DESTDIR}${_LIBDIR}/${SHLIB_LINK} + rm -f ${SHLIB_LINK:R}.ld .for _SHLIB_LINK_LINK in ${SHLIB_LDSCRIPT_LINKS} ${INSTALL_SYMLINK} ${SHLIB_LINK} ${DESTDIR}${_LIBDIR}/${_SHLIB_LINK_LINK} .endfor diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk index cf53d861fe23..0e6a07eeb070 100644 --- a/share/mk/bsd.sys.mk +++ b/share/mk/bsd.sys.mk @@ -231,7 +231,7 @@ stage_files.shlib: ${_LIBS:M*.so.*} .endif .if defined(SHLIB_LINK) && commands(${SHLIB_LINK:R}.ld) -_LDSCRIPTROOT?= ${STAGE_OBJTOP} +#_LDSCRIPTROOT?= ${STAGE_OBJTOP} STAGE_AS_SETS+= ldscript STAGE_AS.ldscript+= ${SHLIB_LINK:R}.ld stage_as.ldscript: ${SHLIB_LINK:R}.ld