Gentoo Archives: gentoo-user

From: Bill Longman <bill.longman@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] -march=native
Date: Tue, 29 Jun 2010 23:13:40
Message-Id: 4C2A7DE9.4010907@gmail.com
In Reply to: Re: [gentoo-user] -march=native by Hasan SAHIN
1 On 06/29/2010 06:08 PM, Hasan SAHIN wrote:
2 > I have read the safe flags document and it says that :
3 >
4 > /GCC 4.2 introduces a new -march option, -march=*native*, which
5 > automatically detects the features your CPU supports and sets the
6 > options appropriately. If you have an Intel or AMD CPU and are using
7 >>=sys-devel/gcc-4.2.3, using -march=native is recommended. Do *not* use
8 > -march=native if you use distcc on nodes with different architectures as
9 > this may produce unusable code. /
10 >
11 > which I understood, I can use the -march=native option instead of
12 >
13 > CFLAGS="-march=k8-msse3 -O2 -pipe -fomit-frame-pointer"
14 >
15 > is it true?
16
17 Yes, -march=native is a good, simple way to optimize your compiles.
18 Here's what you should use on your Athlon64 X2, then:
19
20 CFLAGS="-march=native -O2 -pipe"