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

Re: cross-build-essential

On 28/06/12 10:43, Svante Signell wrote:
> The situation is even more complicated if compiling for different OSes:
> Like as host (build) Linux:i386 and guest (target) kFreeBSD:amd64 or
> Hurd:i386. Any plans to support such combinations with
> cross-build-essential?

It shouldn't differ from compiling for different CPUs: the key problem
in cross-compilation is "your build system can't run your host system's
binaries", which you can arrive at either via differing OSs or differing
CPUs. (Or both, of course.)

Either way, you need to have development libraries for the host system
installed on the build system, and a compiler that can be executed on
the build system, but links against those host system development
libraries and produces machine code for the host system. So, if
cross-build-essential works for x86-64/Linux to armel/Linux
cross-compilation, I don't see any reason why the same techniques
wouldn't work equally well for x86-64/Linux to i386/Hurd.

A note on terminology: in cross-compiling, the standard meaning of
"host" doesn't match how you used it. If I cross-compile a package for
armel on an i386 machine, armel is the "host architecture" and i386 is
the "build architecture".

There is a third variable, "target", which is only used for compilers,
linkers and similar tools: to compile that package, I would have needed
a compiler built for an i386 "host architecture" with an armel "target


Reply to: