Make all shared library a relative symlink

This makes sysroot usable for cross building, it also removes the need for
_SHLIBDIRPREFIX (keeps its definition since picobsd uses it and I have no time
to test it)

Differential Revision:	https://reviews.freebsd.org/D2920
Submitted by:	imp, adrian
Tested by:	adrian
This commit is contained in:
Baptiste Daroussin 2015-06-27 23:28:56 +00:00
parent 8c4b4cc3ba
commit af38028d11
3 changed files with 3 additions and 4 deletions

View File

@ -297,7 +297,6 @@ KTMAKE= TOOLS_PREFIX=${WORLDTMP} MAKEOBJDIRPREFIX=${WORLDTMP} \
# world stage
WMAKEENV= ${CROSSENV} \
_SHLIBDIRPREFIX=${WORLDTMP} \
_LDSCRIPTROOT= \
VERSION="${VERSION}" \
INSTALL="sh ${.CURDIR}/tools/install.sh" \
@ -439,7 +438,6 @@ LIB32FLAGS+= --sysroot=${WORLDTMP}
# Yes, the flags are redundant.
LIB32WMAKEENV+= MAKEOBJDIRPREFIX=${LIB32_OBJTREE} \
_SHLIBDIRPREFIX=${LIB32TMP} \
_LDSCRIPTROOT=${LIB32TMP} \
VERSION="${VERSION}" \
INSTALL="sh ${.CURDIR}/tools/install.sh" \
@ -2123,7 +2121,6 @@ XDTP?=/usr/${XDDIR}
CDBENV=MAKEOBJDIRPREFIX=${MAKEOBJDIRPREFIX}/${XDDIR} \
INSTALL="sh ${.CURDIR}/tools/install.sh"
CDENV= ${CDBENV} \
_SHLIBDIRPREFIX=${XDDESTDIR} \
TOOLS_PREFIX=${XDTP}
CD2CFLAGS=-isystem ${XDDESTDIR}/usr/include -L${XDDESTDIR}/usr/lib \
--sysroot=${XDDESTDIR}/ -B${XDDESTDIR}/usr/libexec \

View File

@ -362,7 +362,7 @@ _libinstall:
.if ${_SHLIBDIR} == ${_LIBDIR}
${INSTALL_SYMLINK} ${SHLIB_NAME} ${DESTDIR}${_LIBDIR}/${SHLIB_LINK}
.else
${INSTALL_SYMLINK} ${_SHLIBDIRPREFIX}${_SHLIBDIR}/${SHLIB_NAME} \
${INSTALL_RSYMLINK} ${DESTDIR}${_SHLIBDIR}/${SHLIB_NAME} \
${DESTDIR}${_LIBDIR}/${SHLIB_LINK}
.if exists(${DESTDIR}${_LIBDIR}/${SHLIB_NAME})
-chflags noschg ${DESTDIR}${_LIBDIR}/${SHLIB_NAME}

View File

@ -222,9 +222,11 @@ INCLUDEDIR?= /usr/include
#
HRDLINK?= -l h
SYMLINK?= -l s
RSYMLINK?= -l rs
INSTALL_LINK?= ${INSTALL} ${HRDLINK}
INSTALL_SYMLINK?= ${INSTALL} ${SYMLINK}
INSTALL_RSYMLINK?= ${INSTALL} ${RSYMLINK}
# Common variables
.if !defined(DEBUG_FLAGS)