sysroot and lib-path

Christer Solskogen christer.solskogen@gmail.com
Fri Nov 9 14:11:00 GMT 2018


On 09.11.2018 14:10, Alan Modra wrote:
> On Fri, Nov 09, 2018 at 09:55:28AM +0100, Christer Solskogen wrote:
>> Okay, but why does it also have
>> SEARCH_DIR("=/opt/cross/arm-linux-gnueabihf/lib") then? That doesn't make
>> sense, does it?
> 
> That's $prefix/$target/lib.  Note that it's inside the sysroot too.
> So in your case the host directory searched would be
> /opt/cross/sysroot.arm-linux-gnueabihf/opt/cross/arm-linux-gnueabihf/lib
> 

Which is why I said that I don't think that makes sense :-) I would 
understand it if no sysroot was set.

> $prefix/$target was an idea that predated sysroot for a place to put
> target and tool specific info.  You might see that directory
> referred to as tooldir.
> 

Yeah, I see that binutils places hardlinks in bin and ldscripts in the 
lib directory. IMHO I think $prefix/$target should be what the sysroot 
would or could be set at, but if I do that now host and target stuff 
would be mixed. Which, right now, makes (only?) sense with a target that 
newlib supports.

But ok, for now on tooldir and sysroot needs to be two different 
directories if you want to use sysroot.



More information about the Binutils mailing list