FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 06-29-2010, 10:00 PM
Bill Longman
 
Default -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?
>
> 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.
 
Old 06-29-2010, 10:01 PM
Alex Schuster
 
Default -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
 
Old 06-29-2010, 10:03 PM
Bill Longman
 
Default -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
 
Old 06-29-2010, 10:07 PM
Paul Hartman
 
Default -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)
 
Old 06-29-2010, 11:12 PM
Bill Longman
 
Default -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"
 
Old 06-30-2010, 12:54 AM
Hasan SAHIN
 
Default -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.
 
Old 06-30-2010, 01:08 AM
Hasan SAHIN
 
Default -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


CFLAGS="-march=k8-msse3 -O2 -pipe -fomit-frame-pointer"

is it true?

Regards,
Hasan.
 
Old 06-30-2010, 01:09 AM
Beau Henderson
 
Default -march=native

On 06/30/10 08:07, Paul Hartman wrote:

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)



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 ).
 

Thread Tools




All times are GMT. The time now is 02:57 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org