[Midnightbsd-cvs] src [9430] trunk/share/mk/bsd.lib.mk: fix comment
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Sun Mar 5 09:23:39 EST 2017
Revision: 9430
http://svnweb.midnightbsd.org/src/?rev=9430
Author: laffer1
Date: 2017-03-05 09:23:38 -0500 (Sun, 05 Mar 2017)
Log Message:
-----------
fix comment
Modified Paths:
--------------
trunk/share/mk/bsd.lib.mk
Modified: trunk/share/mk/bsd.lib.mk
===================================================================
--- trunk/share/mk/bsd.lib.mk 2017-03-05 14:23:07 UTC (rev 9429)
+++ trunk/share/mk/bsd.lib.mk 2017-03-05 14:23:38 UTC (rev 9430)
@@ -292,16 +292,21 @@
.if defined(SHLIB_LINK)
# ${_SHLIBDIRPREFIX} and ${_LDSCRIPTROOT} are both needed when cross-building
# and when building 32 bits library shims. ${_SHLIBDIRPREFIX} is the directory
-# prefix where shared objects will be installed. ${_LDSCRIPTROOT} is the
-# directory prefix that will be used in generated ld(1) scripts. They cannot
-# be coalesced because of the way ld(1) handles the sysroot prefix (used in the
-# cross-toolchain):
-# - 64 bits libs are located under sysroot, so ${_LDSCRIPTROOT} must be empty.
+# prefix where shared objects will be installed by the install target.
+#
+# ${_LDSCRIPTROOT} is the directory prefix that will be used when generating
+# ld(1) scripts. The crosstools' ld is configured to lookup libraries in an
+# alternative directory which is called "sysroot", so during buildworld binaries
+# won't be linked against the running system libraries but against the ones of
+# the current source tree. ${_LDSCRIPTROOT} behavior is twisted because of
+# the location where we store them:
+# - 64 bits libs are located under sysroot, so ${_LDSCRIPTROOT} must be empty
+# because ld(1) will manage to find them from sysroot;
# - 32 bits shims are not, so ${_LDSCRIPTROOT} is used to specify their full
-# path. Note that ld(1) scripts are generated both during buildworld and
-# installworld; in the later case ${_LDSCRIPTROOT} must be obviously empty.
-# On the other hand, the use of ${_SHLIBDIRPREFIX} is more consistent since it
-# does not involve the logic of a tool we do not own.
+# path, outside of sysroot.
+# Note that ld(1) scripts are generated both during buildworld and
+# installworld; in the later case ${_LDSCRIPTROOT} must be obviously empty
+# because on the target system, libraries are meant to be looked up from /.
.if defined(SHLIB_LDSCRIPT) && !empty(SHLIB_LDSCRIPT) && exists(${.CURDIR}/${SHLIB_LDSCRIPT})
sed -e 's,@@SHLIB@@,${_LDSCRIPTROOT}${SHLIBDIR}/${SHLIB_NAME},g' \
-e 's,@@LIBDIR@@,${_LDSCRIPTROOT}${LIBDIR},g' \
More information about the Midnightbsd-cvs
mailing list