Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

While trying to compile a 64 bit linux kernel using gcc, I see the following error :

kernel/bounds.c:1: error: code model ‘kernel’ not supported in the 32 bit mode
kernel/bounds.c:1: sorry, unimplemented: 64-bit mode not compiled in

This is what gcc -v reports :
Using built-in specs.
Target: i586-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man -- infodir=/usr/share/info --with-bugurl= bugzilla --enable-bootstrap --enable-shared --enable-threads=posix -- enable-checking=release --with-system-zlib --enable-__cxa_atexit -- disable-libunwind-exceptions --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.5.0-gcj- -- enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/ usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl -- with-cloog --with-tune=generic --with-arch=i586 --build=i586-redhat- linux
Thread model: posix
gcc version 4.4.1 20090725 (Red Hat 4.4.1-2) (GCC)

Am i missing something on my kernel make command line ? Or is it the gcc present on the system does not support 64 bit compilation ?

share|improve this question
up vote 1 down vote accepted

From your gcc -v output it looks as if you are running on a 32-bit machine, is that correct ?

Target: i586-redhat-linux

Try specifying --with-arch=x86_64 insterad of i586.

share|improve this answer
Its a Pentium 4. I would think that it supports 64 bit, though I am not sure. I already tried with 'make ARCH=x86_64' . Does not seem to help. – vivekian2 Sep 3 '09 at 4:31
You are right. It was a 32 bit machine. I built a x86_64 cross compiler but that did not help either in building the kernel. – vivekian2 Sep 6 '09 at 17:14

Your Answer


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.