[cfe-commits] [PATCH] Improved cross-compiling support for calling helper programs

Joerg Sonnenberger joerg at britannica.bec.de
Thu Mar 17 19:32:27 PDT 2011

On Fri, Mar 18, 2011 at 02:51:01AM +0100, Joerg Sonnenberger wrote:
> On Thu, Mar 17, 2011 at 11:11:01PM +0100, Joerg Sonnenberger wrote:
> > I would expect a sane cross-compiling setup for other platforms to be
> > quite similar. With some additional changes to make the look up for
> > crt0.o and libgcc honour --sysroot, all that is needed for
> > cross-compiliation is using "clang -ccc-host-triple i486--netbsdelf
> > --sysroot $DESTDIR" or adding a symlink and using "i486--netbsdelf-clang
> > --sysroot $DESTDIR".
> Attached patch implements the missing parts of --sysroot. I'm not
> completely happy of moving it to driver, but I wouldn't find an easier
> way to get to the command line arguments early enough.
> Again, other platforms likely want to have the same changes.

Better version. This makes -B =/foobar work as side effect.

Note the --sysroot invocation for linuxtools::Link::ConstructJob should
be checked. At least the version of ld I have doesn't allow
"--sysroot /foo", but requires "--sysroot=/foo" (without error).

-------------- next part --------------
A non-text attachment was scrubbed...
Name: sysroot.diff
Type: text/x-diff
Size: 3676 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110318/53a6fd93/attachment.diff>

More information about the cfe-commits mailing list