Am 09.04.2013 05:50, schrieb Nilesh Govindrajan:
> I have two Gentoo VMs at Hetzner and the CPU supports 64 bit (grep lm
> /proc/cpuinfo = true).
> 
> But something funny, gcc -march=native -mtune=native -v -E - 2>&1
> </dev/null returns this:
> 
> Using built-in specs.
> COLLECT_GCC=/usr/x86_64-pc-linux-gnu/gcc-bin/4.6.3/gcc
> COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/4.6.3/lto-wrapper
> Target: x86_64-pc-linux-gnu
> Configured with:
> /var/tmp/portage/sys-devel/gcc-4.6.3/work/gcc-4.6.3/configure
> --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.6.3
> --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/include
> --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.6.3
> --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.6.3/man
> --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.6.3/info
> --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/include/g++-v4
> --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --disable-altivec
> --disable-fixed-point --without-ppl --without-cloog --enable-lto
> --enable-nls --without-included-gettext --with-system-zlib
> --enable-obsolete --disable-werror --enable-secureplt --enable-multilib
> --enable-libmudflap --disable-libssp --enable-libgomp
> --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/4.6.3/python
> --enable-checking=release --disable-libgcj --enable-libstdcxx-time
> --enable-languages=c,c++,fortran --enable-shared --enable-threads=posix
> --enable-__cxa_atexit --enable-clocale=gnu --enable-targets=all
> --with-bugurl=http://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.6.3
> p1.11, pie-0.5.2'
> Thread model: posix
> gcc version 4.6.3 (Gentoo 4.6.3 p1.11, pie-0.5.2)
> COLLECT_GCC_OPTIONS='-march=native' '-mtune=native' '-v' '-E'
>  /usr/libexec/gcc/x86_64-pc-linux-gnu/4.6.3/cc1 -E -quiet -v -
> -march=pentium-m -mcx16 -msahf -mno-movbe -mno-aes -mno-pclmul -mpopcnt
> -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mbmi -mno-tbm -mno-avx
> -mno-sse4.2 -mno-sse4.1 --param l1-cache-size=32 --param
> l1-cache-line-size=64 --param l2-cache-size=4096 -mtune=generic
> ignoring nonexistent directory "/usr/local/include"
> ignoring nonexistent directory
> "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../x86_64-pc-linux-gnu/include"
> 
> #include "..." search starts here:
> #include <...> search starts here:
>  /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/include
>  /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/include-fixed
>  /usr/include
> End of search list.
> # 1 "<stdin>"
> <stdin>:1:0: error: CPU you selected does not support x86-64 instruction
> set
> 
> It is returning pentium-m as architecture, which indeed is 32bit. I'm
> presently running the VM with -march=core2, but this is very weird.
> 
> This is the /proc/cpuinfo:
> 
> processor       : 0
> vendor_id       : GenuineIntel
> cpu family      : 6
> model           : 2
> model name      : QEMU Virtual CPU version 1.0
> stepping        : 3
> microcode       : 0x1
> cpu MHz         : 3399.998
> cache size      : 4096 KB
> fpu             : yes
> fpu_exception   : yes
> cpuid level     : 4
> wp              : yes
> flags           : fpu de pse tsc msr pae mce cx8 apic sep mtrr pge mca
> cmov pse36 clflush mmx fxsr sse sse2 syscall nx lm rep_good nopl pni vmx
> cx16 popcnt hypervisor lahf_lm
> bogomips        : 6799.99
> clflush size    : 64
> cache_alignment : 64
> address sizes   : 40 bits physical, 48 bits virtual
> power management:
> 
> Any idea what should be the march/mtune value?
> 

I don't have any experience with Hetzner's VMs - I only use their
dedicated machines :)

But as a more generic tip, you should install gentoo in VMs only with
generic optimization. You can not safely rely on what CPU your VM will
get. Maybe in 6 months the host your vm is on crashes, and your vm will
be migrated to a new system with totally different cpu (actual hardware
cpu or the cpu configuration that qemu is going to emulate).

Reply via email to