[PATCH 2 of 2] cross-gdb: fix runtime sysroot

Benoît THÉBAUDEAU benoit.thebaudeau@advansee.com
Wed May 25 18:22:00 GMT 2011


Yann, all,

> How does the cross-gdb behaves if the toolchain is relocated? Is gdb
> able
> to detect that, and adapt the sysroot accordingly, like gcc and ld
> do, or
> is it simply hard-coded?

See below.

> In case relocation does not work, then this would imply that the
> behavior
> of the toolchain (as a whole) is different before and after
> relocation, in
> the former case, sysroot is automatically detected, and in the latter
> case
> the user would have to enter the sysroot location manually with 'set
> sysroot'.

Cross-gdb seems to be looking only for the cross ld-linux.so.3.

By default, if --with-sysroot is not provided, gdb searches under /lib,
/usr/lib, etc. and of course does not find what it is looking for. In
that case, `set sysroot` can be issued to solve the issue.

If --with-sysroot is provided, gdb searches under sysroot/lib,
sysroot/usr/lib, etc., and it adapts sysroot automagically if it is
relocated. `set sysroot` can still be used to force the sysroot to some
other place if needed for some reason.

Regards,
Benoît

--
For unsubscribe information see http://sourceware.org/lists.html#faq



More information about the crossgcc mailing list