View previous topic :: View next topic |
Author |
Message |
borfig Apprentice
Joined: 27 Oct 2004 Posts: 162
|
Posted: Wed Dec 12, 2007 1:47 pm Post subject: Gentoo on KVM: need suggestions for safe CFLAGS |
|
|
I want to install Gentoo on a Kernel-based Virtual Machine, and I could not decide on safe CFLAGS to use.
The /proc/cpuinfo of the guest (x86 - 32bit) is:
Code: | processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 2
model name : QEMU Virtual CPU version 0.9.0
stepping : 3
cpu MHz : 2397.598
cache size : 2048 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx lm up pni
bogomips : 5094.61 |
Any suggestions??? |
|
Back to top |
|
|
ekz l33t
Joined: 21 Jun 2006 Posts: 994 Location: Temuco - Chile
|
Posted: Wed Dec 12, 2007 4:47 pm Post subject: |
|
|
Tip:
From http://gentoo-wiki.com/Safe_Cflags
Code: |
Note: GCC 4.2 introduces a new -march option, -march=native, which automatically detects the features your CPU supports and sets the options appropriately. If you have an Intel or AMD CPU and are using >=sys-devel/gcc-4.2.0, using -march=native is recommended. Do NOT use -march=native if you use distcc on nodes with different architectures as this may produce unusable code. |
Cheers _________________ Mi tumblelog |
|
Back to top |
|
|
borfig Apprentice
Joined: 27 Oct 2004 Posts: 162
|
Posted: Wed Dec 12, 2007 4:53 pm Post subject: |
|
|
how did I missed that green box... |
|
Back to top |
|
|
borfig Apprentice
Joined: 27 Oct 2004 Posts: 162
|
Posted: Thu Dec 13, 2007 8:22 am Post subject: |
|
|
now for the tricky question:
in the kernel configuration - what processor is this??? |
|
Back to top |
|
|
borfig Apprentice
Joined: 27 Oct 2004 Posts: 162
|
Posted: Thu Jan 24, 2008 7:37 pm Post subject: |
|
|
how about safe CFLAGS for gcc 3.4.x ??? |
|
Back to top |
|
|
meulie l33t
Joined: 17 Jun 2003 Posts: 845 Location: a Dutchman living in Norway
|
Posted: Sun Aug 10, 2008 8:28 am Post subject: |
|
|
Or how about correct CFLAGS for a KVM-guest with gcc-4.1.2
cat /proc/cpuinfo gives:
Code: | processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 2
model name : QEMU Virtual CPU version 0.9.1
stepping : 3
cpu MHz : 2398.802
cache size : 2048 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx lm up pni
bogomips : 4998.99
clflush size : 64 |
_________________ Greetz,
Evert Meulie |
|
Back to top |
|
|
o5i n00b
Joined: 16 Feb 2013 Posts: 14 Location: Da Haym
|
Posted: Sun May 12, 2013 8:19 pm Post subject: |
|
|
Hi i have the same problem, but the thread is old.. Someone know what to do? |
|
Back to top |
|
|
Deathwing00 Bodhisattva
Joined: 13 Jun 2003 Posts: 4087 Location: Dresden, Germany
|
Posted: Thu May 16, 2013 8:28 pm Post subject: |
|
|
Moved from Installing Gentoo to Portage & Programming. |
|
Back to top |
|
|
_______0 Guru
Joined: 15 Oct 2012 Posts: 521
|
Posted: Fri May 17, 2013 3:25 pm Post subject: |
|
|
march=native?? |
|
Back to top |
|
|
o5i n00b
Joined: 16 Feb 2013 Posts: 14 Location: Da Haym
|
Posted: Fri May 17, 2013 4:43 pm Post subject: |
|
|
No way... I think the compiler didn`t recognize it... |
|
Back to top |
|
|
nlsa8z6zoz7lyih3ap Guru
Joined: 25 Sep 2007 Posts: 388 Location: Canada
|
Posted: Fri May 17, 2013 5:08 pm Post subject: |
|
|
I know that may will consider this to be heresy, but I use (and suggest)
I used to fuss over the best setting to use in this regard, but after considerable testing I can not find much difference
in performance in my favourite applications between the various choices for -march and -mtune.
The one exception is gcc. It certainly runs faster (for me) with "-mtune=generic" than it does with "-march=native"
Of course on a virtual machine, I think that "-mtune=generic" is the safest choice.
ADDED in Edit:
PS I still use ufed to ensure that particular applications will have USE flags for my cpu's features.
i.e. x264 indicates Quote: | x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2 AVX XOP FMA4 SSEMisalign LZCNT |
even 'tho I am using "-mtune=generic" |
|
Back to top |
|
|
itjunky n00b
Joined: 19 Sep 2013 Posts: 1
|
Posted: Thu Sep 19, 2013 12:13 pm Post subject: |
|
|
I have a problem with -march=native when i try to emerge anything. I see this error in output:
checking whether the C compiler works... no
configure: error: in `/var/tmp/portage/app-arch/xz-utils-5.0.4-r1/work/xz-5.0.4':
configure: error: C compiler cannot create executables
See `config.log' for more details
When i remove -march=native option, its configured and compiled normaly.
gcc version 4.6.3 (Gentoo 4.6.3 p1.13, pie-0.5.2) |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54266 Location: 56N 3W
|
Posted: Thu Sep 19, 2013 12:24 pm Post subject: |
|
|
itjunky,
Please post your output _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
nativemad Developer
Joined: 30 Aug 2004 Posts: 918 Location: Switzerland
|
Posted: Fri Sep 20, 2013 4:59 am Post subject: |
|
|
Just a little tip...
If you're going to run that vm only on that specific hardware, you could start the vm with "-cpu host" as parameter and you'll see the hosts CPU in the VM and -march=native will work!
Cheers _________________ Power to the people! |
|
Back to top |
|
|
|