I have built GCC 4.7 on my x86 32-bit linux system. When I try to cross-compile with the -m64 flag I get the following:
sorry, unimplemented: 64-bit m
You will need both binutils and gcc configured with:
--enable-multilib
and probably:
--enable-targets=i686-pc-linux-gnu,x86_64-pc-linux-gnu
to support multilib (the -m64 and/or -m32 options). You'll also need two versions of stuff like glibc to be able to link and run the resulting binaries.
-m64
-m32