1 |
I have two Gentoo VMs at Hetzner and the CPU supports 64 bit (grep lm |
2 |
/proc/cpuinfo = true). |
3 |
|
4 |
But something funny, gcc -march=native -mtune=native -v -E - 2>&1 |
5 |
</dev/null returns this: |
6 |
|
7 |
Using built-in specs. |
8 |
COLLECT_GCC=/usr/x86_64-pc-linux-gnu/gcc-bin/4.6.3/gcc |
9 |
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/4.6.3/lto-wrapper |
10 |
Target: x86_64-pc-linux-gnu |
11 |
Configured with: |
12 |
/var/tmp/portage/sys-devel/gcc-4.6.3/work/gcc-4.6.3/configure |
13 |
--prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.6.3 |
14 |
--includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/include |
15 |
--datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.6.3 |
16 |
--mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.6.3/man |
17 |
--infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.6.3/info |
18 |
--with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/include/g++-v4 |
19 |
--host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --disable-altivec |
20 |
--disable-fixed-point --without-ppl --without-cloog --enable-lto |
21 |
--enable-nls --without-included-gettext --with-system-zlib |
22 |
--enable-obsolete --disable-werror --enable-secureplt --enable-multilib |
23 |
--enable-libmudflap --disable-libssp --enable-libgomp |
24 |
--with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/4.6.3/python |
25 |
--enable-checking=release --disable-libgcj --enable-libstdcxx-time |
26 |
--enable-languages=c,c++,fortran --enable-shared --enable-threads=posix |
27 |
--enable-__cxa_atexit --enable-clocale=gnu --enable-targets=all |
28 |
--with-bugurl=http://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.6.3 |
29 |
p1.11, pie-0.5.2' |
30 |
Thread model: posix |
31 |
gcc version 4.6.3 (Gentoo 4.6.3 p1.11, pie-0.5.2) |
32 |
COLLECT_GCC_OPTIONS='-march=native' '-mtune=native' '-v' '-E' |
33 |
/usr/libexec/gcc/x86_64-pc-linux-gnu/4.6.3/cc1 -E -quiet -v - |
34 |
-march=pentium-m -mcx16 -msahf -mno-movbe -mno-aes -mno-pclmul -mpopcnt |
35 |
-mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mbmi -mno-tbm -mno-avx |
36 |
-mno-sse4.2 -mno-sse4.1 --param l1-cache-size=32 --param |
37 |
l1-cache-line-size=64 --param l2-cache-size=4096 -mtune=generic |
38 |
ignoring nonexistent directory "/usr/local/include" |
39 |
ignoring nonexistent directory |
40 |
"/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../x86_64-pc-linux-gnu/include" |
41 |
#include "..." search starts here: |
42 |
#include <...> search starts here: |
43 |
/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/include |
44 |
/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/include-fixed |
45 |
/usr/include |
46 |
End of search list. |
47 |
# 1 "<stdin>" |
48 |
<stdin>:1:0: error: CPU you selected does not support x86-64 instruction set |
49 |
|
50 |
It is returning pentium-m as architecture, which indeed is 32bit. I'm |
51 |
presently running the VM with -march=core2, but this is very weird. |
52 |
|
53 |
This is the /proc/cpuinfo: |
54 |
|
55 |
processor : 0 |
56 |
vendor_id : GenuineIntel |
57 |
cpu family : 6 |
58 |
model : 2 |
59 |
model name : QEMU Virtual CPU version 1.0 |
60 |
stepping : 3 |
61 |
microcode : 0x1 |
62 |
cpu MHz : 3399.998 |
63 |
cache size : 4096 KB |
64 |
fpu : yes |
65 |
fpu_exception : yes |
66 |
cpuid level : 4 |
67 |
wp : yes |
68 |
flags : fpu de pse tsc msr pae mce cx8 apic sep mtrr pge mca |
69 |
cmov pse36 clflush mmx fxsr sse sse2 syscall nx lm rep_good nopl pni vmx |
70 |
cx16 popcnt hypervisor lahf_lm |
71 |
bogomips : 6799.99 |
72 |
clflush size : 64 |
73 |
cache_alignment : 64 |
74 |
address sizes : 40 bits physical, 48 bits virtual |
75 |
power management: |
76 |
|
77 |
Any idea what should be the march/mtune value? |
78 |
|
79 |
-- |
80 |
Nilesh Govindarajan |
81 |
http://nileshgr.com |