[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Building cross armel toolchain



On Mon, 05 Mar 2007 15:53:09 -0800
"K. Richard Pixley" <rich.pixley@palmsource.com> wrote:

> I'm confused by some of the terminology here.
>
> As I read the dpkg-cross man page, dpkg-cross isn't building, that
> is, it isn't compiling anything.

Building doesn't have to mean compiling - packages based on bash
scripts are still described as built. Building a package like a Gtk
theme or icon set is simply collecting existing binaries into a
standard format binary. Debian Policy mandates a few extras but the
basic package does not have to be a lot more than a pair of tar.gz
files collated using ar.

Buildd is slightly different - buildd specifically refers to processes
and logs of building architecture-specific packages which usually
involves compilation.

> It simply takes packages which are
> "native" for some architecture and converts them into packages for
> "this" architecture which will install those files in locations
> suitable for use with cross compilers.  Is this correct?

Yes.

> Assuming so, then are people actually cross compiling debian
> packages?

Yes. dpkg-cross is only part of the solution. The main component of
cross building is a cross toolchain - a recompiled version of gcc that
outputs 'alien' ELF binaries. When you build a package, the output
messages may mention 'cc' or similar. When cross building, the output
messages mention 'arm-linux-gcc' or similar. i.e. you compile the
package using a replacement compiler.

Building that compiler is done by specifying the target architecture to
the gcc source code.

This is achieved using 'dpkg-buildpackage -a arm' which causes dpkg to
look for a version of gcc compiled for arm compatible output.

> And if so, is there a common or definitive way to do that
> within this context?

$ sudo apt-get install emdebian-tools
$ emsetup -s
$ emsetup
$ man emdebian-tools

http://www.linux.codehelp.co.uk/#emdebian-tools
http://www.linux.codehelp.co.uk/emdebian/man/

--

Neil Williams
=============
http://www.data-freedom.org/
http://www.nosoftwarepatents.com/
http://www.linux.codehelp.co.uk/

Attachment: pgpui4AkvDyyG.pgp
Description: PGP signature


Reply to: