This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

sysroot and lib-path


Hi!

I'm a bit confused on how binutils (or really ld.bfd / gold) works when building a cross compiler.
For instance, if I build binutils like this:
--target=arm-linux-gnueabihf --with-sysroot=/opt/cross/sysroot.arm-linux-gnueabihf

 /opt/cross/bin/arm-linux-gnueabihf-ld --verbose | grep SEAR
SEARCH_DIR("=/opt/cross/arm-linux-gnueabihf/lib"); SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib"); SEARCH_DIR("=/usr/lib");

Why is directories on the host in SEARCH_DIR? And not $sysroot/lib:$sysroot:usr/lib ?

/opt/cross/bin/arm-linux-gnueabihf-ld --print-sysroot
/opt/cross/sysroot.arm-linux-gnueabihf

I see that LFS (Linux from scratch) adds --with-lib-path to configure their temporary cross compiler, but their way confuses me even more as they point their lib-path to somewhere on the host system that will contain libraries for the host and not for the target.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]