[rfc] using --with-sysroot for native builds
Matthias Klose
doko@ubuntu.com
Fri Oct 29 14:42:00 GMT 2010
More information about the Binutils mailing list
Fri Oct 29 14:42:00 GMT 2010
- Previous message (by thread): [rfc] using --with-sysroot for native builds
- Next message (by thread): [rfc] using --with-sysroot for native builds
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 29.10.2010 04:03, Alan Modra wrote: > On Thu, Oct 28, 2010 at 05:23:23PM +0200, Matthias Klose wrote: >> currently the --sysroot option for ld is only available if binutils >> is configured --with-sysroot=<...>. My use case for using sysroots >> for native builds is having multiple chroots for different releases >> of an OS available for testing, and not having to install a new >> compiler/linker in the chroot itself. This basically works when >> configuring --with-sysroot=/, but then libraries are searched in // >> instead of /. >> >> The following patch makes the --sysroot option available to ld >> independently of the configure option (making ld.bfd and ld.gold >> consistent), and avoids the extra slash prefix. > > I think this should only be made available when native. That's even > what you said above and in $subject, but your patch makes a cross > linker accept --sysroot. Cross-linkers configured without a sysroot > will not search the usual directories. 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 `/'. Matthias -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: sysroot.diff URL: <https://sourceware.org/pipermail/binutils/attachments/20101029/145587c8/attachment.ksh>
- Previous message (by thread): [rfc] using --with-sysroot for native builds
- Next message (by thread): [rfc] using --with-sysroot for native builds
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Binutils mailing list