在尝试使用gcc编译64位Linux内核时,我看到以下错误:
kernel / bounds.c:1:错误:在32位模式下不支持代码模型'kernel'
kernel / bounds.c:1:抱歉,未实现:未编译的64位模式
这是gcc -v报告的内容:
使用内置的规格。
目标:i586-redhat-linux
configuration:../configure –prefix = / usr –mandir = / usr / share / man – infodir = / usr / share / info –with-bugurl = http://bugzilla.redhat.com/ 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-1.5.0.0 / jre -enable-libgcj-multifile -enable-java -developer-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
线程模型:posix
gcc版本4.4.1 20090725(Red Hat 4.4.1-2)(GCC)
我在我的内核make命令行上丢失了什么? 或者是系统上的gcc目前不支持64位编译?
从你的gcc -v输出看起来好像你是在一台32位的机器上运行的,这是否正确?
Target: i586-redhat-linux
试试指定–with-arch = x86_64 insterad的i586。