how does buildword search the right directories?

Simon 'corecode' Schubert corecode at fs.ei.tum.de
Sat Aug 21 05:38:11 PDT 2004


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
Attachment:
PGP.sig
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pgp00004.pgp
Type: application/octet-stream
Size: 186 bytes
Desc: "Description: This is a digitally signed message part"
URL: <http://lists.dragonflybsd.org/pipermail/kernel/attachments/20040821/1549ad28/attachment-0018.obj>


More information about the Kernel mailing list