On 10 August 2011 15:48, Jonathan Wakely <jwakely.gcc@xxxxxxxxx> wrote: > On 10 August 2011 14:56, Joe Young wrote: >> Problems building 64 bit gnu gcc >> x86 Solaris 10 >> source gcc-3.4.6 >> >> How do you get gnu gcc to build a 64 bit binary compiler? >> >> I've got two gcc-3.4.6 source directories. And am compiling the first >> with >> ./configure -with-arch-64=i386 --with-tune-64=i386 --with-cpu-64=i386 I'm not sure that configuration makes any sense. Obviously i386 does not support 64-bit extensions, so any 64-bit x86 binary must be running on at least an AMD64 or EM64T CPU, which support far more than the basic i386 instruction set. Also, --with-cpu is a synonym for --with-tune on x86, so is redundant. And --with-arch implies --with-tune, so that's redundant too. You probably just want --with-arch-64=opteron or something like that, or just leave them out entirely, the resulting i386-pc-solaris2.10 compiler will be 64-bit capable anyway. >> in order to make a 64 bit capable gcc compiler ready and able to >> compile the second source directory with the same configure line (albeit with >> a different destination and install directory) in order to end up with a >> 64 bit gcc compiler. >> >> The problem is that both compilations produce the same result, a 32 >> bit gcc /usr/local/bin/gcc: ELF 32-bit LSB executable 80386 Version 1 [FPU], >> dynamically linked, not stripped > > You can't, at least for GCC 3.4.6, which only supports i386-*-solaris* > configurations. > > Starting with GCC 4.7 you can configure it for x86_64-*-solaris2.10 > which produces a 64-bit binary, which (I believe) defaults to > producing 64-bit output. See http://gcc.gnu.org/install/specific.html#ix86-x-solaris210 and http://gcc.gnu.org/install/specific.html#x86-64-x-solaris2_002e10