* [gentoo-user] gcc and -match=native
@ 2009-04-21 0:20 Beau Henderson
2009-04-21 2:08 ` Mike Kazantsev
0 siblings, 1 reply; 4+ messages in thread
From: Beau Henderson @ 2009-04-21 0:20 UTC (permalink / raw
To: gentoo-user
G'day,
I was playing around with a few non-essential packages the other day
using -march=native -v on my core2 duo ( configured with
CHOST="i686-pc-linux-gnu" ) and noticed that GCC set the -march=core2
rather than what is typically suggested on the 3rd party wiki ( which
is to use prescott ). According to the GCC docs, the core2 option
includes instructions for x86_64 but would this be ultimately ignored
seeing as the CHOST is set to i686 or would these instructions bloat
the resulting binaries or could they result in conflicts of some sort
down the line ?
on my Athlon64 it uses ( the 3rd party wiki recommended ) k8-sse3 but
I did notice that the option -mtune=k8 ( no -sse3 ) is set.
I'm a little confused as to how the native option selects the best
fit. I know that -march=native is not "supported". I'm just rather
interested in figuring out why these options are selected and if I'm
better off with them in place.
Note, that there have been no issues *noticed* with final results.
--
Beau Dylan Henderson
"No human being should be denied the fundamental right to educate
themselves or indulge their curiosities. To deny any person the right
to do so, for whatever reason, is nothing more than the safeguarding
of ignorance to ensure that enlightenment does not become a threat.
For nothing in this world is more dangerous than an open mind." --
Matthew Good
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-user] gcc and -match=native
2009-04-21 0:20 [gentoo-user] gcc and -match=native Beau Henderson
@ 2009-04-21 2:08 ` Mike Kazantsev
2009-04-21 2:29 ` Beau Henderson
0 siblings, 1 reply; 4+ messages in thread
From: Mike Kazantsev @ 2009-04-21 2:08 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1003 bytes --]
On Tue, 21 Apr 2009 10:20:34 +1000
Beau Henderson <beau@thehenderson.com> wrote:
> I was playing around with a few non-essential packages the other day
> using -march=native -v on my core2 duo ( configured with
> CHOST="i686-pc-linux-gnu" ) and noticed that GCC set the -march=core2
> rather than what is typically suggested on the 3rd party wiki ( which
> is to use prescott ). According to the GCC docs, the core2 option
> includes instructions for x86_64 but would this be ultimately ignored
> seeing as the CHOST is set to i686 or would these instructions bloat
> the resulting binaries or could they result in conflicts of some sort
> down the line ?
AFAIK they should be harmlessly ignored - if produced machine code will
contain them, it'll just break as soon as cpu gets down to them.
Besides, they are useless for program which works with 32-bit registers
and data, so there should be no point to insert them anywhere in x86
binary.
--
Mike Kazantsev // fraggod.net
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-user] gcc and -match=native
2009-04-21 2:08 ` Mike Kazantsev
@ 2009-04-21 2:29 ` Beau Henderson
2009-04-21 3:01 ` Mike Kazantsev
0 siblings, 1 reply; 4+ messages in thread
From: Beau Henderson @ 2009-04-21 2:29 UTC (permalink / raw
To: gentoo-user
On Tue, Apr 21, 2009 at 12:08 PM, Mike Kazantsev
<mike_kazantsev@fraggod.net> wrote:
> On Tue, 21 Apr 2009 10:20:34 +1000
> Beau Henderson <beau@thehenderson.com> wrote:
>
>> I was playing around with a few non-essential packages the other day
>> using -march=native -v on my core2 duo ( configured with
>> CHOST="i686-pc-linux-gnu" ) and noticed that GCC set the -march=core2
>> rather than what is typically suggested on the 3rd party wiki ( which
>> is to use prescott ). According to the GCC docs, the core2 option
>> includes instructions for x86_64 but would this be ultimately ignored
>> seeing as the CHOST is set to i686 or would these instructions bloat
>> the resulting binaries or could they result in conflicts of some sort
>> down the line ?
>
> AFAIK they should be harmlessly ignored - if produced machine code will
> contain them, it'll just break as soon as cpu gets down to them.
>
> Besides, they are useless for program which works with 32-bit registers
> and data, so there should be no point to insert them anywhere in x86
> binary.
>
> --
> Mike Kazantsev // fraggod.net
>
So is GCC ignoring the fact that the systems CHOST is i686 or is this
truly optimized for my situation ?
--
Beau Dylan Henderson
"No human being should be denied the fundamental right to educate
themselves or indulge their curiosities. To deny any person the right
to do so, for whatever reason, is nothing more than the safeguarding
of ignorance to ensure that enlightenment does not become a threat.
For nothing in this world is more dangerous than an open mind." --
Matthew Good
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-04-21 3:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-21 0:20 [gentoo-user] gcc and -match=native Beau Henderson
2009-04-21 2:08 ` Mike Kazantsev
2009-04-21 2:29 ` Beau Henderson
2009-04-21 3:01 ` Mike Kazantsev
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox