Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I know my linux box is x86_64 and I want to be able to compile FOR x86_64 as well via GCC. Currently...

gcc -v 

shows

Using built-in specs.
**Target: i386-redhat-linux**
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info   
--enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-  
__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable- 
languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --enable-plugin  
--with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic **--host=i386-redhat-linux**
Thread model: posix
gcc version 4.1.2 20080704 (Red Hat 4.1.2-48)

How do I change the Target: to x86_64 and the --host to x86_64?

share|improve this question
add comment

1 Answer

Turns out I needed to upgrade my gcc to x86_64. I was running a x86_64 but for some reason my gcc was i386. I upgraded my gcc to 64bit by searching for it on yum and then tried updating. I had to delete the i386 gcc and some of its dependencies and then the update worked. gcc -v now shows Target: x86_64-redhat-linux

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.