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-30-2010, 01:54 AM
Albert Hopkins
 
Default -march=native

On Wed, 2010-06-30 at 11:09 +1000, Beau Henderson wrote:
> On 06/30/10 08:07, Paul Hartman wrote:
[...]
> > 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 ).
>

-march sometimes implies a some things. E.g., anything above a pentium2
implies MMX. My hunch is that k8-sse3 implies... sse3.
 
Old 06-30-2010, 02:26 PM
Paul Hartman
 
Default -march=native

On Tue, Jun 29, 2010 at 8:54 PM, Albert Hopkins <marduk@letterboxes.org> wrote:
> On Wed, 2010-06-30 at 11:09 +1000, Beau Henderson wrote:
>> On 06/30/10 08:07, Paul Hartman wrote:
> [...]
>> > 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 ).
>>
>
> -march sometimes implies a some things. E.g., anything above a pentium2
> implies MMX. My hunch is that k8-sse3 implies... sse3.

See this page of the GCC documentation for some info about what is
enabled in the different arches:

http://gcc.gnu.org/onlinedocs/gcc-4.4.3/gcc/i386-and-x86_002d64-Options.html
 
Old 06-30-2010, 02:30 PM
Paul Hartman
 
Default -march=native

On Tue, Jun 29, 2010 at 8:09 PM, Beau Henderson <beau@thehenderson.com> wrote:
> 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 ).

What -march setting is it showing in that output? The MMX (etc) may be
enabled implicitly instead of explicitly.

It's also possible that the CPU detection is failing to identify your
CPU. In that case you could probably file a bug report about it.
 
Old 06-30-2010, 10:21 PM
Beau Henderson
 
Default -march=native

On 07/01/10 00:30, Paul Hartman wrote:

On Tue, Jun 29, 2010 at 8:09 PM, Beau Henderson<beau@thehenderson.com> wrote:

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


What -march setting is it showing in that output? The MMX (etc) may be
enabled implicitly instead of explicitly.

It's also possible that the CPU detection is failing to identify your
CPU. In that case you could probably file a bug report about it.



The correct -march is being displayed, I just can't make sense of the options showing as [disabled].
While the option may be implied by the -march settings, it just makes sense to me that the option
should show as enabled. Indeed, with my core2 machine the majority of the options do display as
enable as expected, just not with my k8-see3 @native.


I wonder if perhaps it might be possible to compile an application that uses all these functions and
then assess ( somehow ) the binaries afterwards to see if they were compiled in and working correctly ?


Here's what I'm seeing on my k8-sse3: http://pastebin.com/PfMiTnx5

And my core2: http://pastebin.com/7WerGwkX
 
Old 07-04-2010, 05:52 PM
James Cloos
 
Default -march=native

>>>>> "BH" == Beau Henderson <beau@thehenderson.com> writes:

BH> The correct -march is being displayed, I just can't make sense of the
BH> options showing as [disabled]. While the option may be implied by the
BH> -march settings, it just makes sense to me that the option should show
BH> as enabled. Indeed, with my core2 machine the majority of the options
BH> do display as enable as expected, just not with my k8-see3 @native.

FWIW, a tests on -march=amdfam10 on both gentoo and debian also show odd
enabled/disabled results, as do debian k8-sse3 and core2 boxen. The
fedora core2 box I have access to, however, shows reasonable enableds.

Odd.

-JimC
--
James Cloos <cloos@jhcloos.com> OpenPGP: 1024D/ED7DAEA6
 

Thread Tools




All times are GMT. The time now is 09:59 AM.

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