Re: how does buildword search the right directories?

看板DFBSD_kernel作者時間21年前 (2004/08/22 02:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/4 (看更多)
--Apple-Mail-5-967992838 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed On 21.08.2004, at 14:19, Simon 'corecode' Schubert wrote: > How does buildworld search the right directories for > includes/libraries, i.e. not the default system path (/usr/lib, > /usr/include), but the buildworld path > (/usr/obj/usr/src/world_i386/usr/lib...)? > > And... If buildworld doesn't do it, how would it be done (need this > for a cross compile project)? heh, hand me a cluebat to hit myself :), found it: calling /usr/bin/ld --verbose shows /usr/lib as search path. calling /usr/obj/usr/src/world_i386/usr/bin/ld --verbose *also* showed /usr/lib as search path. Why? because ld is objformat'ed and thus calls /usr/libexec/binutils212/elf/ld, not minding the changed binary path. And it seems those binaries care about their location to determine which path to search. so setting OBJFORMAT_PATH to the proper location helps these tools finding the right path. JFYI, of course cheers simon -- /"\ \ / \ ASCII Ribbon Campaign / \ Against HTML Mail and News --Apple-Mail-5-967992838 content-type: application/pgp-signature; x-mac-type=70674453; name=PGP.sig content-description: This is a digitally signed message part content-disposition: inline; filename=PGP.sig content-transfer-encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (Darwin) iD8DBQFBJ0Hyr5S+dk6z85oRAkwCAKD9wtpu5qIlpM69ncKx2sERIHQDnQCgzyLy 1/NhUimpbwlZt9Ovzei1cCE= =yMZN -----END PGP SIGNATURE----- --Apple-Mail-5-967992838--
文章代碼(AID): #119utq00 (DFBSD_kernel)
文章代碼(AID): #119utq00 (DFBSD_kernel)