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

RFC: cross toolchain and Debian



Hi,

I'm working on trying to make Debian friendlier to embedded systems.

I'm writing to you toolchain people because I want to make it easier
to create a cross toolchain on Debian.  I know that this has been
tried a number of different ways in the past, and I have looked
through the archives for insight.

Creating a whole slew of cross tools is a problem because:

1 - it takes a _long_ time on some archs

2 - we'll never please everyone, for example embedded systems
  developers who need special patches, or are using an arch that Debian
  hasn't been ported to.

3 - it bloats the archive, glibc is big.

I'd suggest, therefore, to provide hooks for creating a cross
toolchain in the source packages and by default not create anything
except native (maybe multi-arch too) tools.  This similar to the way
the tools on www.emdebian.org are created.  As long as the system is
documented people will be able to follow along without much trouble.

This is how I would like to see someone create a cross toolchain under
Debian, for a powerpc target as an example:

Get the most recent versions of binutils, gcc and glibc.
# export DEB_TARGET_GNU_TYPE=powerpc-linux
# cd binutils-x.x.x.x ; dpkg-buildpackage -uc -us
dpkg-deb: building package `binutils-cross-powerpc-linux' in . . . 

build/install gcc-core-x.x.x, then build/install glibc-x.x,
then build gcc-x.x.x

Once I have configured dpkg-cross I can do:

# apt-get source libgmp3
# cd libgmp3-x.x.x ; dpkg-buildpackage -apowerpc
. . .
dpkg-deb: building package `libgmp3` in `../libgmp3_x.x.x-x_powerpc.deb' 
#
That is the library that I can install on the target, I can then do

# dpkg-cross -apowerpc -b libgmp3_x.x.x-x_powerpc.deb

to get headers and libs installed on the system.


Thoughts?

-David



Reply to: