[rfc] using --with-sysroot for native builds

Daniel Jacobowitz dan@codesourcery.com
Sat Oct 30 17:00:00 GMT 2010


On Sat, Oct 30, 2010 at 10:45:25AM +1030, Alan Modra wrote:
> On Fri, Oct 29, 2010 at 10:59:34AM -0400, Daniel Jacobowitz wrote:
> > On Fri, Oct 29, 2010 at 04:42:08PM +0200, Matthias Klose wrote:
> > > the attached patch makes this change in ldmain.c conditionally on
> > > native/cross.  An alternative would be to make the change
> > > unconditionally and let the configure fail for a cross build, if
> > > --with-sysroot is missing in the configure args, or if the value
> > > passed is `' or `/'.
> > 
> > IMO, a cross linker should default to not using a sysroot, but still
> > support the --sysroot option...
> 
> See genscripts.sh occurrences of use_sysroot.  As Andreas pointed out
> we cannot start using native search paths for cross tools, but
> --sysroot ought to use the native paths within the sysroot.
> Supporting this isn't just a simple patch, is it?

A little more complicated, yes; we'd need to separate "sysroot
defaults to root" from "sysroot not specified", and ignore sysrooted
path if the sysroot was not specified, then pick which was which when
building the linker.

-- 
Daniel Jacobowitz
CodeSourcery



More information about the Binutils mailing list