Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
best -march switch for pentium4
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
bishop
n00b
n00b


Joined: 27 May 2002
Posts: 21
Location: Rochester, MN

PostPosted: Sun Jun 02, 2002 6:08 am    Post subject: best -march switch for pentium4 Reply with quote

According to this page:

http://gcc.gnu.org/onlinedocs/gcc-3.1/gcc/i386-and-x86-64-Options.html#i386%20and%20x86-64%20Options

pentium4 can be specified for -mcpu and -march in make.conf

However, when I try it, my ebuilds fail, with:
Code:

cc1: bad value (pentium4) for -march= switch


also, if this were to work, would I keep i686-pc-linux-gnu as CHOST flag? Or would is there a pentium4-pc-linux-gnu target?

TIA
Back to top
View user's profile Send private message
BradN
Advocate
Advocate


Joined: 19 Apr 2002
Posts: 2383
Location: Wisconsin (USA)

PostPosted: Sun Jun 02, 2002 7:14 am    Post subject: Reply with quote

perhaps it's a GCC 3 only option. I'm assuming you're still using 2.9x?
Back to top
View user's profile Send private message
c_kuzmanic
Guru
Guru


Joined: 18 Apr 2002
Posts: 488
Location: Los Angeles , California

PostPosted: Sun Jun 02, 2002 8:26 am    Post subject: Reply with quote

What's a "PENTIUM-4"? Is that a slower, older version of an Athlon?
:D :wink: 8O
Back to top
View user's profile Send private message
craftyc
Guru
Guru


Joined: 23 May 2002
Posts: 443
Location: Behind You.

PostPosted: Sun Jun 02, 2002 1:21 pm    Post subject: Reply with quote

c_kuzmanic wrote:
What's a "PENTIUM-4"? Is that a slower, older version of an Athlon?
:D :wink: 8O


That's kind of a silly question. Do a google search for it, or go to www.intel.com and search their site.

The options should already be set. If you look under the USE variable (in the /etc/make.conf file) there are a few options that set the parameters. Set them accordingly. This is what my /etc/make.conf file looks like.

Code:
# Copyright 2000-2002 Daniel Robbins, Gentoo Technologies, Inc.
# Contains system settings for Portage system

# Download sites

# The main Gentoo Linux source mirror; specify as many space-separated mirrors
# as you like.
GENTOO_MIRRORS="http://www.ibiblio.org/gentoo"
# The main Gentoo Linux Portage server; specify a single Portage server.
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
# An alternate download server if you prefer anoncvs.  emerge dev-util/cvs
# for cvs support in emerge.  The password for this CVS server is empty --
# just hit Enter.
#SYNC="cvs://:pserver:anonymous@gentoo.org:/home/anoncvs"

# Build-time functionality

# USE=""
# USE options are inherited from /etc/make.profile/make.defaults.  To turn a USE
# setting off, add a "-setting" to the USE variable here.  To enable a setting,
# add the setting name to the USE variable here.  Separate USE toggles with
# whitespace.

# Host-specific settings

# For optimization, the -mcpu= option will cause binaries to be optimized for a
# particular x86 CPU, but will continue to work on all CPUs.  The -march=
# option, on the other hand, will instruct the compiler to use instuctions
# specific to that particular CPU in order to enhance performance.  Resultant
# binaries will *not* run on other systems unless they are 100% compatible with
# your processor's instruction set.  For example, -march=i686 will produce
# executables that do not execute on Pentium Classic or K6 systems, but will
# run on Pentium Pro and "above" systems.  -march=x automatically enables
# -mcpu=x.

# Examples:

# Pentium Pro/Pentium II/Pentium III+/Pentium 4/Athlon optimized (but binaries
# will run on any x86 system)
#CHOST="i686-pc-linux-gnu"
#CFLAGS="-mcpu=i686 -O3 -pipe"
#CXXFLAGS="-mcpu=i686 -O3 -pipe"

# Pentium Pro/Pentium II/Pentium III+/Pentium 4/Athlon exclusive (binaries
# will use the P6 instruction set and only run on P6+ systems)
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=i686 -O3 -pipe"
CXXFLAGS="-march=i686 -O3 -pipe"

# Pentium/Pentium MMX+ exclusive (requires a Pentium Classic or K6 or beyond)
#CHOST="i586-pc-linux-gnu"
#CFLAGS="-march=i586 -O3 -pipe"
#CXXFLAGS="-march=i586 -O3 -pipe"

# K6 exclusive (requires a K6 or beyond)
#CHOST="i586-pc-linux-gnu"
#CFLAGS="-mcpu=k6 -march=k6 -O3 -pipe"
#CXXFLAGS="-mcpu=k6 -march=k6 -O3 -pipe"

#proxy settings PROXY(both), or HTTP_PROXY/FTP_PROXY
#PROXY=freebox.gentoo.org:3128
#HTTP_PROXY=
#FTP_PROXY=

# Uncomment if you wanna use Prozilla for download
# you need to merge prozilla first!
#FETCHCOMMAND='/usr/bin/proz --no-getch -s ${URI} -P ${DISTDIR}'

# Uncomment to use Lukemftp for download (the FreeBSD fetcher)
# you need to merge lukemftp first!
#FETCHCOMMAND='/usr/bin/lukemftp -s -a -o ${DISTDIR}/${FILE} ${URI}'

# Uncomment if you are a package maintainer with cvs access
# The following fine grained configuration options are now available
# digest : automatically create a digest for new ebuilds
# cvs : automatically commit new digests to cvs
# sandbox : enable the sandbox for path prefix protection
# noclean : don't clean the temp dirs when emerge terminates
# noauto : don't execute prior ebuild steps automatically
#          (eg. 'ebuild install' does just that and not
#          'fetch unpack compile install'
#FEATURES="digest cvs sandbox noclean noauto"


Hope this helps.
_________________
Postcount ++
Back to top
View user's profile Send private message
arkane
l33t
l33t


Joined: 30 Apr 2002
Posts: 918
Location: Phoenix, AZ

PostPosted: Sun Jun 02, 2002 5:12 pm    Post subject: Reply with quote

c_kuzmanic wrote:
What's a "PENTIUM-4"? Is that a slower, older version of an Athlon?
:D :wink: 8O


It's the cooler, more compatible version of the Athlon 8O :lol:
Back to top
View user's profile Send private message
bishop
n00b
n00b


Joined: 27 May 2002
Posts: 21
Location: Rochester, MN

PostPosted: Sun Jun 02, 2002 5:27 pm    Post subject: Reply with quote

Oh, I suppose. I am using 2.95....hmm. so I guess I'd have to emerge 3.1, then change CFLAGS -march=pentium4, then recompile gcc3.1, so gcc gets the benefits of being faster too? :)

I'll give that a rip.

Thanks.
Back to top
View user's profile Send private message
Malakin
Veteran
Veteran


Joined: 14 Apr 2002
Posts: 1692
Location: Victoria BC Canada

PostPosted: Sun Jun 02, 2002 5:50 pm    Post subject: Reply with quote

Don't emerge gcc 3.1 unless you know what you're doing, you're more likely to screw up your Gentoo install.

The speed difference between gcc 2.9x and 3.1 is very small, for Athlons it's apparently about a 6% improvement, not sure about p4's.
Back to top
View user's profile Send private message
lx
Veteran
Veteran


Joined: 28 May 2002
Posts: 1012
Location: Netherlands

PostPosted: Sun Jun 02, 2002 9:27 pm    Post subject: Reply with quote

Malakin wrote:
Don't emerge gcc 3.1 unless you know what you're doing, you're more likely to screw up your Gentoo install.

The speed difference between gcc 2.9x and 3.1 is very small, for Athlons it's apparently about a 6% improvement, not sure about p4's.


try 10-20%, but maybe for some less cpu intensive programs it will be 6, using gcc 3.1 is not recommended, because it may cause some small problems with some packages and also plugins won't work with mozilla (compiled with gcc 3.x), There's an gcc3 folder in the forum index.

Pentium-4 is from intel, Athlon is made by AMD.

I personally think AMD is better (AMD 1200Ghz has better performace than Pentium 1400, and lower price / heat, this is with all chips that's why AMD rates its chips with a frequency compared to a intel chip, :lol: )

Cya lX.
_________________
"Remember there's a big difference between kneeling down and bending over.", Frank Zappa
Back to top
View user's profile Send private message
BradN
Advocate
Advocate


Joined: 19 Apr 2002
Posts: 2383
Location: Wisconsin (USA)

PostPosted: Sun Jun 02, 2002 9:30 pm    Post subject: Reply with quote

Actually AMD uses a 'performance rating' where Intel uses the clock speed. I agree that AMD chips are better though.

Edit: I see what you were saying now... they rate using the clock speed of a comparable pentium 4... didn't quite understand it right away :)
Back to top
View user's profile Send private message
lx
Veteran
Veteran


Joined: 28 May 2002
Posts: 1012
Location: Netherlands

PostPosted: Sun Jun 02, 2002 9:47 pm    Post subject: Reply with quote

BradN wrote:
Actually AMD uses a 'performance rating' where Intel uses the clock speed. I agree that AMD chips are better though.

Edit: I see what you were saying now... they rate using the clock speed of a comparable pentium 4... didn't quite understand it right away :)


Yep, that's what I ment to say, but you said it in a way people can understand it, :wink:
_________________
"Remember there's a big difference between kneeling down and bending over.", Frank Zappa
Back to top
View user's profile Send private message
craftyc
Guru
Guru


Joined: 23 May 2002
Posts: 443
Location: Behind You.

PostPosted: Sun Jun 02, 2002 9:58 pm    Post subject: Reply with quote

BradN wrote:
Actually AMD uses a 'performance rating' where Intel uses the clock speed. I agree that AMD chips are better though.

Edit: I see what you were saying now... they rate using the clock speed of a comparable pentium 4... didn't quite understand it right away :)


Why don't AMD measure their chips with clock speed as well, then it would be easier for consumers... or am I just thick?
_________________
Postcount ++
Back to top
View user's profile Send private message
lx
Veteran
Veteran


Joined: 28 May 2002
Posts: 1012
Location: Netherlands

PostPosted: Sun Jun 02, 2002 10:01 pm    Post subject: Reply with quote

craftyc wrote:
Why don't AMD measure their chips with clock speed as well, then it would be easier for consumers... or am I just thick?
A amd athlon-xp 1800 for example runs on a clockfrequency of 1566Mhz (just out the top of my head). It's still comparable in performance to a pentium 4 running on a clockfrequency of 1800Mhz. (in most fields it's even better, but I'm biased, using athlon thunderbird 1.2Ghz myself. :wink:). Many people think that higher klokfrequency is better, however this is partially true, because using optimisations technique and some other secret magic stuff you can also win a lot in speed.
_________________
"Remember there's a big difference between kneeling down and bending over.", Frank Zappa
Back to top
View user's profile Send private message
Malakin
Veteran
Veteran


Joined: 14 Apr 2002
Posts: 1692
Location: Victoria BC Canada

PostPosted: Mon Jun 03, 2002 12:58 am    Post subject: Reply with quote

Quote:
try 10-20%, but maybe for some less cpu intensive programs it will be 6


Actually I remembered it wrong, it's 8.1% (6% + 2.1%)

Quote:

http://gcc.gnu.org/gcc-3.1/changes.html

According to the SPECInt2000 results on an AMD Athlon CPU, the code generated by GCC 3.1 is 6% faster on the average (8.2% faster with profile feedback) compared to GCC 3.0. The code produced by GCC 3.0 is about 2.1% faster compared to 2.95.3. Tests were done using the -O2 -march=athlon command-line options.
Back to top
View user's profile Send private message
lx
Veteran
Veteran


Joined: 28 May 2002
Posts: 1012
Location: Netherlands

PostPosted: Mon Jun 03, 2002 8:05 am    Post subject: Reply with quote

So maybe your right, but what about floating point??????. Also heard that c++ compiling was hugely improved in speed.

Always difficult to have accurate benchmarks and to take into the account the effect actually has on the speed of your gnu/linux box. Well I just like the option march=athlon-tbird.

btw. In the tests they use a athlon 1.113Ghz processor, so maybe the speed increase is higher for example a athlon-xp or a pentium iV.

Well gcc 3.1 support more CPU's (athlon hammer 64bit or something) so some people just might need to use it.
_________________
"Remember there's a big difference between kneeling down and bending over.", Frank Zappa
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum