LWN.net Logo

Cross compilation

Cross compilation

Posted Nov 11, 2005 18:04 UTC (Fri) by ringerc (subscriber, #3071)
In reply to: Cross by ncm
Parent article: Cell Broadband Engine Software Development Kit Version 1.0

His reply would indicate he has. If he's had to use a cross compilation environment for more than very simple work, I expect he'll look about 30 years older in person than he actually is, and will wince whenever you say "is that a target binary, a host binary, or both?".

Cross compilation is in my limited experience a serious pain. Maintaining a target toolchain is annoying, and many build systems are distinctly unhelpful with cross compilation. If you have the misfortune to need to cross compile software that hasn't been cross-compiled from the beginning, it seems to be remarkably unpleasant much of the time.

Given the choice, if I could run my dev tools on my target, most of the time I'd want to.


(Log in to post comments)

Cross compilation

Posted Nov 11, 2005 22:08 UTC (Fri) by oak (subscriber, #2786) [Link]

> will wince whenever you say "is that a target binary, a host binary, or
both?"
>
> Cross compilation is in my limited experience a serious pain

You haven't tried Scratchbox from www.scratchbox.org?

With that you can run on your desktop both target and host binaries,
target binaries are automatically run either in an emulator (currently
Qemu) or if there's not good enough emulation, transparently over the
network on a target system with NFS exported development environment.

For latter, you only need to enable NFS in the target kernel and have a
small daemon running on it. After you've done your development & testing,
you just reboot the target machine with your devel env as it's NFS root
and proceed with system testing (startup etc)...


> If you have the misfortune to need to cross compile software that hasn't
> been cross-compiled from the beginning, it seems to be remarkably
> unpleasant much of the time.

Scratchbox has been developed to handle that kind of a stuff and to even
cross-compile whole distributions. All the autoconf crap works just fine
without any modifications and even cross-building Debian is now possible.
(which is AFAIK impossible with any other tool because of the circular
dependencies in Debian base packages and other problems)

Only things which are a bit of a pain / not always handled automatically
are situations where program wants to compile the same library both as a
host and target binary (e.g. Mozilla), or where as a part of build
process, the target software wants to install a binary extension to a
scripting language (perl, python, m4) which is used also on the
cross-compilation environment as host tool (for speed reasons).

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds