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

Re: ./configure in debian/rules

On Thu, 09 Mar 2006, Peter Kourzanov wrote:
> For most of the packages, what is so different in cross-compilation in 
> comparison to native?

On my limited cross-compiling knowledge (and nearly zero experience), you
have three classes of packages:

1. Those that just compile, link and ship -- these should crosscompile
automatically if using up-to-date, correctly setup autoconf/automake/libtool
build machinery, etc.

2. Those that also need build-time utilities (prime example: the Linux
kernel) -- these need to know they must use the host CC for building local
tools, and not the cross-compiler.  Interestingly enough, I can't find a
proper way to get access to the correct host compiler... 

Don't tell me I am supposed to run two configure scripts, one in "force
non-crosscompiling mode, but somehow tell the built tools the
will-cross-compile-for arch" to build the compile-time tools, and another to
do the actual app cross-compilation.  Yuck, this is stupid.

3. Those packages that modify the build depending on data gathered from the
host system, or that use tools in the host system that generate non
architecture-agnostic data but are not cross-compiling aware -- these often
need to be extensively modified to cross-compile.

autoconf can be your enemy re. (3).  Tests that are not just a "locate lib"
or "test compile but do NOT run" will often kill cross-compilation.

> is to just issue a 'dpkg-buildpackage -aHOST ' on every single one of 
> them and get a .deb file(s)

Interestingly, the notion of BUILD and HOST in dpkg-buildpackage(1) is
opposite to that on up-to-date autotools.  Oh well.

They should have just called it host, target and target-of-target instead of
host, build and target.

> As I've indicated earlier, Debian is in fact quite close to this wet 
> dream of mine, it just misses on a

Is it really?  I'd be pleasantly (and very) surprised if that worked for a
high percentage of our packages given (2) and (3) above.  

  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh

Reply to: