[Clfs-support] Why cross-compiling?

Joe Ciccone jciccone at gmail.com
Wed Jul 1 16:57:18 PDT 2009

Antonio Bulgheroni wrote:
> Good point, but then I don't understand why you want to install
> *CROSS* Linux from scratch. Can't you do simply Linux From Scratch?
It's not only the cross-compiler, its the type of build. I prefer to use
a cross-toolchain even when building x86_64 to x86_64.
> “There are 10 kinds of people.  Those that understand binary and those
> that don’t.”
> On Wed, Jul 1, 2009 at 2:52 AM, booleandomain <booleandomain at gmail.com
> <mailto:booleandomain at gmail.com>> wrote:
>     Hello,
>     I'm a CLFS newbie. I don't understand why cross-compiling tools
>     such as binutils and gcc. Let me explain. My CPU is an Intel Core
>     2 Duo. The host system is Gentoo Linux running on that CPU. uname
>     -m returns x86_64. I want my target Linux system to run on the
>     same computer as the host system, so the target should return
>     x86_64 too. So why putting x86_64-cross-linux-gnu for --build and
>     --host and x86_64-pc-linux-gnu for --target? It should be
>     build=host=target=x86_64-pc-linux-gnu (native mode).
The reason is to force packages to use their cross-compiling logic even
while on the same host architecture. I don't know if this is still the
case since I havn't tested it in a long time, but compiling glibc would
fail if your host and target triplets were the same and you were using a
cross-compiler. Hence replacing the vendor value with -cross- fixed the
issue. This was approx 3 years ago.

More information about the Clfs-support mailing list