[Top][All Lists]

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

Re: cross-compiling on 64 to 32-bit Linuxlocalhost/

From: Grégory Pakosz
Subject: Re: cross-compiling on 64 to 32-bit Linuxlocalhost/
Date: Wed, 3 Mar 2010 00:14:50 +0100

> You need a bi-arch system, that is, one that has the system libraries both in 
> a
> 64-bit variant and in a 32-bit variant (typically in /lib64 and /lib,
> respectively).

> For compiling in 32-bit mode, I use

>  ./configure --host=i686-pc-linux-gnu \
>               --prefix=/arch/x86-linux/gnu \
>               CC="gcc -m32 -march=i586" \
>               CXX="g++ -m32 -march=i586" \
>               LDFLAGS="-m32"


I'm curious about why setting "--host=i686-pc-linux-gnu" is not enough
to achieve cross compiling and why in that case it's not up to
autoconf to add "-m32" to CC.

I know the autoconf manual says you're better of using CC="gcc -m32"
or CC="gcc -m64" (see

But somehow, it feels weird to write CC="gcc -m32" when one purpose of
autoconf is actually to select a compiler for you. Isn't there another
way around CC="gcc -m32" or CFLAGS="-m32"?

Or are -m32 and -m64 peculiarities of GCC only?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]