When running on Fedora x86 64 bit do you need to specify -m64 in gcc to create 64 bit applications or does it default to 64 bit compile & link? Also will applications compiled on Fedora x86 32 bit using -m64 run on Fedora x86 64 bit?
Steve
On Wed, Nov 12, 2008 at 10:20:01AM -0500, Steve West wrote:
When running on Fedora x86 64 bit do you need to specify -m64 in gcc to create 64 bit applications or does it default to 64 bit compile & link?
It defaults to 64 bit.
Also will applications compiled on Fedora x86 32 bit using -m64 run on Fedora x86 64 bit?
With the possible exception of the kernel, that's unlikely to work at all since a 32 bit system won't have 64 bit libraries installed to link against.
Ewan
Ewan Mac Mahon <ewan <at> macmahon.me.uk> writes:
With the possible exception of the kernel, that's unlikely to work at all since a 32 bit system won't have 64 bit libraries installed to link against.
And Fedora's 32-bit GCC builds don't support -m64 at all. (The reason being that supporting -m64 in a 32-bit GCC slows down GCC significantly for everyone, even when building 32-bit stuff. So it's better to use a separate cross-compiler. Or just to run a 64-bit system.)
Kevin Kofler