Hi Denis,

> Setting CC, LD, AR etc. before calling configure is the way I'm
> cross compiling usually. We could add an option like "--with-cross=prefix"
> so you can call "./configure --with-cross=mips-linux-" or similar and
> all required variables are derived. I think that's how the kernel does it.
Indeed, our distribution build environment does indeed
do this to get around many broken configure scripts that
are lurking out there. I only came across the issue in
DirectFB while building the latest CVS tree in my own
environment. The shame is that using the standard configure
options:

 --host=sh4-linux --build=i686-pc-linux-gnu

gets all the cross tools right, except for LD. There really
shouldn't be a need for an explicit --with-cross option;
that is what I thought the standard configure/autotools
framework was there for.

I realise that making the configure script safe in a cross
environment is extra work and that many packages simply
don't bother (I know this from first hand experience of trying
to get the things to build). It causes all sorts of problems
when they do tests based on the contents or existence of
header files in /usr/include or build small programs and
test their output; because when building cross you are
testing the wrong thing. However, for a package that is
designed for embedded systems in mind, I would hope
that cross builds just worked.

You are mainly correct about the kernel, it uses the variable
CROSS_COMPILE for the tools prefix, specified on the make
command line.

Regards,
-stephen


_______________________________________________
directfb-dev mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev

Reply via email to