* [gentoo-user] Re: -march=auto
2009-05-21 19:08 ` -march=auto (was: Re: [gentoo-user] [OT]eee 900a intel atom is what processor family?) Alex Schuster
@ 2009-05-21 19:30 ` Alex Schuster
2009-05-21 19:43 ` Paul Hartman
2009-05-21 22:06 ` Peter Humphrey
2009-05-22 10:21 ` -march=auto (was: Re: [gentoo-user] [OT]eee 900a intel atom is what processor family?) Daniel Iliev
1 sibling, 2 replies; 10+ messages in thread
From: Alex Schuster @ 2009-05-21 19:30 UTC (permalink / raw
To: gentoo-user
I just wrote:
> > Could also perhaps try -march=auto if you're using a version of GCC
> > that supports it.
Oh, it's -march=native.
> BTW, is there a possibility to let gcc tell what flags it will actually
> use with -march=auto?
Paul Hartman just posted a link to a script that seems to do what I was
looking for in the "[OT]eee 900a intel atom is what processor family?"
thread: <http://www.pixelbeat.org/scripts/gcccpuopt>
But it suggests using -march=k8 - isn't that a 64-bit-only thing? I'm not
compiling for AMD64, I'm still using 32-bit mode. So I have -march=athlon-xp
in my CFLAGS for my AMD Athlon(tm) Dual Core Processor 4850e CPU.
Wonko
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-user] Re: -march=auto
2009-05-21 19:30 ` [gentoo-user] Re: -march=auto Alex Schuster
@ 2009-05-21 19:43 ` Paul Hartman
2009-05-21 22:06 ` Peter Humphrey
1 sibling, 0 replies; 10+ messages in thread
From: Paul Hartman @ 2009-05-21 19:43 UTC (permalink / raw
To: gentoo-user
On Thu, May 21, 2009 at 2:30 PM, Alex Schuster <wonko@wonkology.org> wrote:
> Paul Hartman just posted a link to a script that seems to do what I was
> looking for in the "[OT]eee 900a intel atom is what processor family?"
> thread: <http://www.pixelbeat.org/scripts/gcccpuopt>
>
> But it suggests using -march=k8 - isn't that a 64-bit-only thing? I'm not
> compiling for AMD64, I'm still using 32-bit mode. So I have -march=athlon-xp
> in my CFLAGS for my AMD Athlon(tm) Dual Core Processor 4850e CPU.
Hi,
That script says it is specifically for 32-bit only, so I think you
should be good.
According to:
http://gcc.gnu.org/onlinedocs/gcc-4.3.3/gcc/i386-and-x86_002d64-Options.html
It looks like that CPU type supports the amd64 instruction set but I
don't think itt necessarily means you are using it in 64-bit mode. I
think it would just simply not work at all if it's not valid for
32-bit mode.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-user] Re: -march=auto
2009-05-21 19:30 ` [gentoo-user] Re: -march=auto Alex Schuster
2009-05-21 19:43 ` Paul Hartman
@ 2009-05-21 22:06 ` Peter Humphrey
2009-05-22 0:25 ` Alex Schuster
1 sibling, 1 reply; 10+ messages in thread
From: Peter Humphrey @ 2009-05-21 22:06 UTC (permalink / raw
To: gentoo-user
On Thursday 21 May 2009 20:30:19 Alex Schuster wrote:
> Paul Hartman just posted a link to a script that seems to do what I was
> looking for in the "[OT]eee 900a intel atom is what processor family?"
> thread: <http://www.pixelbeat.org/scripts/gcccpuopt>
It's the same thread as your own message is in. Changing the subject does
not remove references from headers, nor should it. In other words, if you
want to start a new thread, click "new", not "reply".
</soapbox>
--
Rgds
Peter
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-user] Re: -march=auto
2009-05-21 22:06 ` Peter Humphrey
@ 2009-05-22 0:25 ` Alex Schuster
0 siblings, 0 replies; 10+ messages in thread
From: Alex Schuster @ 2009-05-22 0:25 UTC (permalink / raw
To: gentoo-user
Peter Humphrey writes:
> On Thursday 21 May 2009 20:30:19 Alex Schuster wrote:
> > Paul Hartman just posted a link to a script that seems to do what I was
> > looking for in the "[OT]eee 900a intel atom is what processor family?"
> > thread: <http://www.pixelbeat.org/scripts/gcccpuopt>
>
> It's the same thread as your own message is in. Changing the subject does
> not remove references from headers, nor should it. In other words, if you
> want to start a new thread, click "new", not "reply".
I wanted to keep the thread, but change the topic accordingly. I just did
not check the original topic, so I overlooked the posting I mentioned was
supposed to be in the same thread - that's a little silly of me, actually :)
It shows up in a different thread, though, because the references were lost.
looks like Maxim's YahooMailWebService always drops them.
Wonko
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-user] Re: -march=auto
@ 2009-05-22 17:36 maxim wexler
2009-05-22 21:36 ` ABCD
2009-05-22 21:53 ` Alex Schuster
0 siblings, 2 replies; 10+ messages in thread
From: maxim wexler @ 2009-05-22 17:36 UTC (permalink / raw
To: gentoo-user
--- On Thu, 5/21/09, Alex Schuster <wonko@wonkology.org> wrote:
> From: Alex Schuster <wonko@wonkology.org>
> Subject: [gentoo-user] Re: -march=auto
> To: gentoo-user@lists.gentoo.org
> Received: Thursday, May 21, 2009, 12:30 PM
> I just wrote:
>
> > > Could also perhaps try -march=auto if you're
> using a version of GCC
> > > that supports it.
>
> Oh, it's -march=native.
>
> > BTW, is there a possibility to let gcc tell what flags
> it will actually
> > use with -march=auto?
>
> Paul Hartman just posted a link to a script that seems to
> do what I was
> looking for in the "[OT]eee 900a intel atom is what
> processor family?"
> thread: <http://www.pixelbeat.org/scripts/gcccpuopt>
>
> But it suggests using -march=k8 - isn't that a 64-bit-only
> thing? I'm not
For an 900A w/intel Atom?
This is what I get:
Warning: Your compiler supports the -march=native option which you may prefer
Warning: Newer versions of GCC better support your CPU with -march=atom
-march=core2 -mtune=pentium -mfpmath=sse.
Now I'm confused. It says *my* compiler supports -march=native. Then it says "Newer versions". Isn't v4.3.2 new? It was from a new pkg about a month ago. Is it giving me a choice here? Can I really declare two -march variables? What about mtune and mfpath, are they meant to be "instead of" or "in addition to"? What goes in the kernel config? What in /etc/paludis/bashrc?
Maxim
__________________________________________________________________
Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your favourite sites. Download it now
http://ca.toolbar.yahoo.com.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [gentoo-user] Re: -march=auto
2009-05-22 17:36 maxim wexler
@ 2009-05-22 21:36 ` ABCD
2009-05-22 21:53 ` Alex Schuster
1 sibling, 0 replies; 10+ messages in thread
From: ABCD @ 2009-05-22 21:36 UTC (permalink / raw
To: gentoo-user
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
maxim wexler wrote:
>
> For an 900A w/intel Atom?
>
> This is what I get:
>
> Warning: Your compiler supports the -march=native option which you
> may prefer
If you use this, then you 1) must be using >=sys-devel/gcc-4.2, and 2)
will always have the "best" optimization for your machine, so far as the
version of gcc you are using understands.
> Warning: Newer versions of GCC better support your CPU with -march=atom
In order to use this, you will need gcc-4.5, which hasn't been released yet.
> -march=core2 -mtune=pentium -mfpmath=sse.
This is the recommendation that the script actually made - it suggests
to use all of these.
> Now I'm confused. It says *my* compiler supports -march=native. Then
> it says "Newer versions". Isn't v4.3.2 new? It was from a new pkg about
> a month ago. Is it giving me a choice here? Can I really declare two
> -march variables? What about mtune and mfpath, are they meant to be
> "instead of" or "in addition to"? What goes in the kernel config? What
> in /etc/paludis/bashrc?
The newest version of gcc out right now is 4.4.0 (currently in
package.mask). I would suggest setting CFLAGS="-O2 -march=native -pipe"
and CXXFLAGS="-O2 -march=native -pipe" in /etc/paludis/bashrc (assuming
that that is the proper location for those variables).
- --
ABCD
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkoXGvUACgkQOypDUo0oQOoDGgCfQdRS+hQtTVKIITl2UvExt5NH
6g4AoJvL7fC2+Gr2KlYIS3WqMnyeJ9qE
=1r28
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 10+ messages in thread
* [gentoo-user] Re: -march=auto
2009-05-22 10:21 ` -march=auto (was: Re: [gentoo-user] [OT]eee 900a intel atom is what processor family?) Daniel Iliev
@ 2009-05-22 21:44 ` Alex Schuster
0 siblings, 0 replies; 10+ messages in thread
From: Alex Schuster @ 2009-05-22 21:44 UTC (permalink / raw
To: gentoo-user
Daniel Iliev writes:
> Alex Schuster <wonko@wonkology.org> wrote:
> > BTW, is there a possibility to let gcc tell what flags it will
> > actually use with -march=auto?
>
> gcc -Q --help=target -march=native
Cool, thanks!
Wonko
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-user] Re: -march=auto
2009-05-22 17:36 maxim wexler
2009-05-22 21:36 ` ABCD
@ 2009-05-22 21:53 ` Alex Schuster
1 sibling, 0 replies; 10+ messages in thread
From: Alex Schuster @ 2009-05-22 21:53 UTC (permalink / raw
To: gentoo-user
maxim wexler writes:
> --- On Thu, 5/21/09, Alex Schuster <wonko@wonkology.org> wrote:
> > But it suggests using -march=k8 - isn't that a 64-bit-only
> > thing? I'm not
>
> For an 900A w/intel Atom?
No, I have an AMD Athlon(tm) Dual Core Processor 4850e.
> This is what I get:
>
> Warning: Your compiler supports the -march=native option which you may
> prefer Warning: Newer versions of GCC better support your CPU with
> -march=atom -march=core2 -mtune=pentium -mfpmath=sse.
>
> Now I'm confused. It says *my* compiler supports -march=native. Then it
> says "Newer versions". Isn't v4.3.2 new? It was from a new pkg about a
> month ago. Is it giving me a choice here? Can I really declare two -march
> variables? What about mtune and mfpath, are they meant to be "instead of"
> or "in addition to"?
I'm also confused. Multiple -march options make no sense I believe, as does
specifying both -march and -mtune, as -mtune is implied by -march. And the
docs say in the section about
-mfpmath=sse:
For the i386 compiler, you need to use `-march=CPU-TYPE',
`-msse' or `-msse2' switches to enable SSE extensions and
make this option effective. For the x86-64 compiler, these
extensions are enabled by default.
So it seems to me that -mfpmath does not need to be set.
Well, I'd just use -march=native, unless when using distcc. If so, Daniel's
tip about 'gcc -Q --help=target -march=native' will give you the exact
options to use.
Wonko
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-user] Re: -march=auto
@ 2009-05-22 23:55 maxim wexler
2009-05-23 2:21 ` Alex Schuster
0 siblings, 1 reply; 10+ messages in thread
From: maxim wexler @ 2009-05-22 23:55 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 476 bytes --]
> If so, Daniel's
> tip about 'gcc -Q --help=target -march=native' will give
> you the exact
> options to use.
>
> Wonko
>
>
See attachment please. Some stuff is enabled, some disabled, some blank. And -march=prescott !?
Maxim
__________________________________________________________________
The new Internet Explorer® 8 - Faster, safer, easier. Optimized for Yahoo! Get it Now for Free! at http://downloads.yahoo.com/ca/internetexplorer/
[-- Attachment #2: gcc-Q --]
[-- Type: application/octet-stream, Size: 2767 bytes --]
The following options are target specific:
-m128bit-long-double [disabled]
-m32 [enabled]
-m3dnow [disabled]
-m3dnowa [disabled]
-m64 [disabled]
-m80387 [enabled]
-m96bit-long-double [enabled]
-mabm [disabled]
-maccumulate-outgoing-args [disabled]
-malign-double [disabled]
-malign-functions=
-malign-jumps=
-malign-loops=
-malign-stringops [enabled]
-march= prescott
-masm=
-mbranch-cost=
-mcld [disabled]
-mcmodel=
-mcx16 [disabled]
-mfancy-math-387 [enabled]
-mfp-ret-in-387 [enabled]
-mfpmath=
-mfused-madd [enabled]
-mglibc [enabled]
-mhard-float [enabled]
-mieee-fp [enabled]
-minline-all-stringops [disabled]
-minline-stringops-dynamically [disabled]
-mintel-syntax [disabled]
-mlarge-data-threshold=
-mmmx [disabled]
-mms-bitfields [disabled]
-mno-align-stringops [disabled]
-mno-fancy-math-387 [disabled]
-mno-push-args [disabled]
-mno-red-zone [disabled]
-mno-sse4 [enabled]
-momit-leaf-frame-pointer [disabled]
-mpc
-mpopcnt [disabled]
-mpreferred-stack-boundary=
-mpush-args [enabled]
-mrecip [disabled]
-mred-zone [enabled]
-mregparm=
-mrtd [disabled]
-msahf [enabled]
-msoft-float [disabled]
-msse [disabled]
-msse2 [disabled]
-msse3 [disabled]
-msse4 [disabled]
-msse4.1 [disabled]
-msse4.2 [disabled]
-msse4a [disabled]
-msse5 [disabled]
-msseregparm [disabled]
-mssse3 [disabled]
-mstack-arg-probe [disabled]
-mstackrealign [disabled]
-mstringop-strategy=
-mtls-dialect=
-mtls-direct-seg-refs [enabled]
-mtune= generic
-muclibc [disabled]
-mveclibabi=
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-user] Re: -march=auto
2009-05-22 23:55 [gentoo-user] Re: -march=auto maxim wexler
@ 2009-05-23 2:21 ` Alex Schuster
0 siblings, 0 replies; 10+ messages in thread
From: Alex Schuster @ 2009-05-23 2:21 UTC (permalink / raw
To: gentoo-user
maxim wexler writes:
> > If so, Daniel's tip about 'gcc -Q --help=target -march=native' will give
> > you the exact options to use.
> See attachment please. Some stuff is enabled, some disabled, some blank.
Try this:
gcc -Q --help=target -march=native > /tmp/gccoptions.native
gcc -Q --help=target > /tmp/gccoptions.plain
diff /tmp/gccoptions.*
This will show the things that specifying -march=native turns on. Put this
in your CFLAGS, unless you use -march=native.
> And -march=prescott !?
Why not? Seems gcc 4.3 does not have the -march=atom optimization yet. It's
also suggested here:
http://en.gentoo-wiki.com/wiki/Safe_Cflags/Intel#Atom
Wonko
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2009-05-23 2:22 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-22 23:55 [gentoo-user] Re: -march=auto maxim wexler
2009-05-23 2:21 ` Alex Schuster
-- strict thread matches above, loose matches on Subject: below --
2009-05-22 17:36 maxim wexler
2009-05-22 21:36 ` ABCD
2009-05-22 21:53 ` Alex Schuster
2009-05-21 2:52 [gentoo-user] [OT]eee 900a intel atom is what processor family? maxim wexler
2009-05-21 18:41 ` Paul Hartman
2009-05-21 19:08 ` -march=auto (was: Re: [gentoo-user] [OT]eee 900a intel atom is what processor family?) Alex Schuster
2009-05-21 19:30 ` [gentoo-user] Re: -march=auto Alex Schuster
2009-05-21 19:43 ` Paul Hartman
2009-05-21 22:06 ` Peter Humphrey
2009-05-22 0:25 ` Alex Schuster
2009-05-22 10:21 ` -march=auto (was: Re: [gentoo-user] [OT]eee 900a intel atom is what processor family?) Daniel Iliev
2009-05-22 21:44 ` [gentoo-user] Re: -march=auto Alex Schuster
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox