On 06/29/2010 05:54 PM, Hasan SAHIN wrote:
> Hello all,
>
> I am using Athlon64 X2 processor with the
> CFLAGS="-march=k8 -O2 -pipe -fomit-frame-pointer" option.
>
> Can I use the -march=native option instead of that?
>
> P.S. : I am using x86 stable box.
Depends more on the version of gcc you're using. And you can also add
-msse on the X2. Supposedly there's a -march=k8-sse but in my experience
it was not good. Others may have different experience.
06-29-2010, 10:01 PM
Alex Schuster
-march=native
Hasan SAHIN writes:
> I am using Athlon64 X2 processor with the
> CFLAGS="-march=k8 -O2 -pipe -fomit-frame-pointer" option.
>
> Can I use the -march=native option instead of that?
Sure, as long as you are not using distcc, in which case the distcc
servers would compile according to _their_ native option.
Wonko
06-29-2010, 10:03 PM
Bill Longman
-march=native
On 06/29/2010 05:54 PM, Hasan SAHIN wrote:
> Hello all,
>
> I am using Athlon64 X2 processor with the
> CFLAGS="-march=k8 -O2 -pipe -fomit-frame-pointer" option.
>
> Can I use the -march=native option instead of that?
Sorry, Hasan, I dropped my "3"s.
-msse3 and -march=k8-sse3
06-29-2010, 10:07 PM
Paul Hartman
-march=native
2010/6/29 Hasan SAHIN <hasan.sahin@gmx.com>:
> Hello all,
>
> I am using Athlon64 X2 processor with the
> CFLAGS="-march=k8 -O2 -pipe -fomit-frame-pointer" option.
>
> Can I use the -march=native option instead of that?
You can see which options -march=native would use by running this command:
gcc -Q --help=target -march=native
(thanks to Daniel Iliev for the tip)
06-29-2010, 11:12 PM
Bill Longman
-march=native
On 06/29/2010 06:08 PM, Hasan SAHIN wrote:
> I have read the safe flags document and it says that :
>
> /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.3, 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. /
>
> which I understood, I can use the -march=native option instead of
>
> CFLAGS="-march=k8-msse3 -O2 -pipe -fomit-frame-pointer"
>
> is it true?
Yes, -march=native is a good, simple way to optimize your compiles.
Here's what you should use on your Athlon64 X2, then:
CFLAGS="-march=native -O2 -pipe"
06-30-2010, 12:54 AM
Hasan SAHIN
-march=native
Hello all,
I am using Athlon64 X2 processor with the
CFLAGS="-march=k8 -O2 -pipe -fomit-frame-pointer" option.
Can I use the -march=native option instead of that?
P.S. : I am using x86 stable box.
Regards,
Hasan.
06-30-2010, 01:08 AM
Hasan SAHIN
-march=native
29-06-2010 22:03, Bill Longman yazmış:
On 06/29/2010 05:54 PM, Hasan SAHIN wrote:
Hello all,
I am using Athlon64 X2 processor with the
CFLAGS="-march=k8 -O2 -pipe -fomit-frame-pointer" option.
Can I use the -march=native option instead of that?
Sorry, Hasan, I dropped my "3"s.
-msse3 and -march=k8-sse3
Hi Bill,
I have read the safe flags document and it says that :
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.3, 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.
which I understood, I can use the -march=native option instead of
I am using Athlon64 X2 processor with the
CFLAGS="-march=k8 -O2 -pipe -fomit-frame-pointer" option.
Can I use the -march=native option instead of that?
You can see which options -march=native would use by running this command:
gcc -Q --help=target -march=native
(thanks to Daniel Iliev for the tip)
Perhaps I'm missing something but running the above gives me the impression that -march=native
actually only configures the bare minimal install. I'm not seeing -mmmx or -msse3 enabled on my
k8-sse3 for instance ( amongst much else ).