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-09-2008, 03:47 AM
Andrew Gaydenko
 
Default gcc-4.3.x and Core 2 Duo, safe way

gcc-4.3.1 is umasked now. I'm on ~amd64 with Core 2 Duo CPU. Is it
sufficient just to set

CFLAGS="-O2 -march=core2 -mtune=core2 -pipe"

instead of

CFLAGS="-O2 -march=native -mtune=native -pipe"

which I have in make.conf now? Are there any other things to do?


Andrew
--
gentoo-user@lists.gentoo.org mailing list
 
Old 06-09-2008, 05:43 AM
Graham Murray
 
Default gcc-4.3.x and Core 2 Duo, safe way

Andrew Gaydenko <a@gaydenko.com> writes:

> gcc-4.3.1 is umasked now. I'm on ~amd64 with Core 2 Duo CPU. Is it
> sufficient just to set
>
> CFLAGS="-O2 -march=core2 -mtune=core2 -pipe"
>
> instead of
>
> CFLAGS="-O2 -march=native -mtune=native -pipe"
>
> which I have in make.conf now? Are there any other things to do?

Should the two not be equivalent? On a core2 processor, should
-march=native not generate code for the core2?
--
gentoo-user@lists.gentoo.org mailing list
 
Old 06-09-2008, 06:11 AM
Andrew Gaydenko
 
Default gcc-4.3.x and Core 2 Duo, safe way

======= On Monday 09 June 2008, Graham Murray wrote: =======
> Andrew Gaydenko <a@gaydenko.com> writes:
> > gcc-4.3.1 is umasked now. I'm on ~amd64 with Core 2 Duo CPU. Is it
> > sufficient just to set
> >
> > CFLAGS="-O2 -march=core2 -mtune=core2 -pipe"
> >
> > instead of
> >
> > CFLAGS="-O2 -march=native -mtune=native -pipe"
> >
> > which I have in make.conf now? Are there any other things to do?
>
> Should the two not be equivalent? On a core2 processor, should
> -march=native not generate code for the core2?

I don't know - 'core2' flag is a 4.3.x invention :-)
--
gentoo-user@lists.gentoo.org mailing list
 
Old 06-09-2008, 07:17 AM
Justin
 
Default gcc-4.3.x and Core 2 Duo, safe way

Graham Murray schrieb:

Andrew Gaydenko <a@gaydenko.com> writes:


gcc-4.3.1 is umasked now. I'm on ~amd64 with Core 2 Duo CPU. Is it
sufficient just to set


CFLAGS="-O2 -march=core2 -mtune=core2 -pipe"

instead of

CFLAGS="-O2 -march=native -mtune=native -pipe"

which I have in make.conf now? Are there any other things to do?



Should the two not be equivalent? On a core2 processor, should
-march=native not generate code for the core2?

I can't remember where (but it could only be in the wiki or the official
gcc docs), I read that using -march="YOURARCH" should be preferred over
-march=native.
 
Old 06-09-2008, 01:33 PM
Robert Bridge
 
Default gcc-4.3.x and Core 2 Duo, safe way

On Mon, 09 Jun 2008 06:43:41 +0100
Graham Murray <graham@gmurray.org.uk> wrote:

> Andrew Gaydenko <a@gaydenko.com> writes:
>
> > gcc-4.3.1 is umasked now. I'm on ~amd64 with Core 2 Duo CPU. Is it
> > sufficient just to set
> >
> > CFLAGS="-O2 -march=core2 -mtune=core2 -pipe"
> >
> > instead of
> >
> > CFLAGS="-O2 -march=native -mtune=native -pipe"
> >
> > which I have in make.conf now? Are there any other things to do?
>
> Should the two not be equivalent? On a core2 processor, should
> -march=native not generate code for the core2?

If we are going to get picky about this, it should be noted the -march
implies -mtune, at least according to the gcc man pages, and I will
trust them to know.

I can't remember which will actually be implemented if both are
specified, but march is a essentially a stronger version of mtune which
breaks compatibility with other CPUs within the same ARCH type. (i.e.
march=pentium4 may not run on a pentium3, but should run faster than
mtune on a pentium4)

RobbieAB
--
gentoo-user@lists.gentoo.org mailing list
 

Thread Tools




All times are GMT. The time now is 03:28 PM.

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