How does --with-sysroot work?

Daniel Jacobowitz drow@mvista.com
Thu Aug 14 20:54:00 GMT 2003


On Thu, Aug 14, 2003 at 01:51:37PM -0700, H. J. Lu wrote:
> On Thu, Aug 14, 2003 at 02:18:46PM -0400, Daniel Jacobowitz wrote:
> > On Thu, Aug 14, 2003 at 11:15:50AM -0700, H. J. Lu wrote:
> > > I tried --with-sysroot. But it doesn't work right for me if I run
> > > gcc/ld in the build directory. The problem is both gcc/ld will change
> > > sysroot to $(target_alias) under the build directory. But it is not
> > > the sysroot at all. I will see what I can do.
> > 
> > Please be more precise with how you configured.  That's not enough
> > information to say anything.
> > 
> > The sysroot, at least for GCC, is relocated at runtime iff it is a
> > subdirectory of $exec_prefix and it exists.  Using
> > $exec_prefix/$target_alias is not a good choice.  Then the compiler
> > will look for $target_alias/usr/include, not $target_alias/include.
> > 
> 
> I used --with-sysroot=$exec_prefix/$target_alias. It can't work. I
> believe configure/Makefile should reject this setting.

Sure, it can work.  It just doesn't work as you expect it to.  If you
create the appropriate directories, then it'll search in the right
place.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer



More information about the Binutils mailing list