Re: [gentoo-user] The age old (CFLAGS) question..

2003-07-03 Thread Owen Gunden
On Thu, Jul 03, 2003 at 11:47:49PM +, drewbian wrote:
> Most certainly, I had mentioned in my origional email as the basis for 
> my confusion as it contains a number of conflicting posts.

Sorry about that--I only caught the tail end of the thread.

Owen

--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] The age old (CFLAGS) question..

2003-07-03 Thread drewbian
Owen Gunden wrote:

Did you read this yet?

http://forums.gentoo.org/viewtopic.php?t=5717&highlight=cflags+central

 

Most certainly, I had mentioned in my origional email as the basis for 
my confusion as it contains a number of conflicting posts.

but thank you



--
[EMAIL PROTECTED] mailing list


Re: [gentoo-user] The age old (CFLAGS) question..

2003-07-03 Thread Owen Gunden
Did you read this yet?

http://forums.gentoo.org/viewtopic.php?t=5717&highlight=cflags+central

--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] The age old (CFLAGS) question..

2003-07-03 Thread Eric Ball
On Thu, 3 Jul 2003 07:14 pm, Robin H.Johnson wrote to [EMAIL PROTECTED]:

> For your list of CFLAGS there, I'd advise you to read what the gcc
> manpage has on them. Some of them are ok, but solely due the following
> ones, I personally as a developer wouldn't support your bugs until you
> recompiled without them.
>
> -fmerge-all-constants - "using this option will result in non-conforming
> behavior."
>
> -fomit-frame-pointer - "It also makes debugging impossible on some
> machines." (this is even in bold in the manpage)
>
> -ffast-math - "it can result in incorrect output for programs which
> depend on an exact implementation of IEEE or ISO rules/specifications
> for math functions."
>
> The most of the rest of your CFLAGS I would consider as fine, and just a
> waste of your own time in compiling things (but hey, it is _your_ time
> you are wasting).

I know, I've read the info page, but it *feels* faster. And I understand that 
if I have problems the first thing to do is to re-emerge (with -e if 
necessary) with saner CFLAGS, but (surprisingly) I haven't found any yet.

And according to the emerge logs, compilation time isn't increased by more 
than ~20% on most packages, so it works for me.

-Eric
-- 
We are all born mad.  Some remain so.
-- Samuel Beckett


--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] The age old (CFLAGS) question..

2003-07-03 Thread Sami Näätänen
On Thursday 03 July 2003 06:50, drewbian wrote:
> On Thu, 2003-07-03 at 18:28, Eric Ball wrote:
> > On Thu, 3 Jul 2003 12:42 pm, drewbian wrote to gentoo-user:
> > > > After looking through the huge array of optimizations people
> > > > have posted on the discussion forum's I'm rather confused as to
> > > > what the hey to put in there. Particularly as most posters seem
> > > > to use Pent 4's or Athlon XP's,
> > > >
> > > > Also would -march=athlon be the most suitable for a Duron 1.3?
> >
> > I understand that Morgan-core Durons (the >1GHz ones I believe) are
> > just Athlon-XP's with less cache, so you can use -march=athlon-xp
> > which will be (slightly) faster.
> >
> > My CFLAGS for an Athlon XP 1800+ are:
> >
> > CFLAGS="-march=athlon-xp -O3 -pipe -mcpu=athlon-xp -m3dnow -mmmx
> > -msse -mfpmath=sse,387 -finline-functions -fmerge-all-constants
> > -fthread-jumps -fomit-frame-pointer -fexpensive-optimizations
> > -ffast-math -fforce-addr -falign-functions=64 -falign-jumps=4
> > -falign-loops=4 -frerun-cse-after-loop -frerun-loop-opt
> > -fprefetch-loop-arrays -maccumulate-outgoing-args"
> >
> > Which contains some duplications but _seems_ to work perfectly.
> > Note this will probably make people cry "Are you crazy and/or
> > stupid!?" and developers will likely refuse to do troubleshooting
> > on any problems you may have.
> >
> > -Eric
>
> Thanks for replying,
>
> Man, that's a lot of cflags ;) I"m going to try err toward the
> conservative but this will give me lots to muck around with.
>
> The -march=athlon-xp bit is particularly interesting. I only had
> -mach=athlon in make.conf before.

And because you have duron stay away from unroll optimizations this 
simply overloads the caching and thus code runs slower.

So a basic "-march=athlon-xp -O2 -pipe" Should be on the fastest 
optimizations in general on your setup.

I use -O2 in my P4 because of the same reason (well small L2 cache not 
cache in general)



--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] The age old (CFLAGS) question..

2003-07-03 Thread Robin H . Johnson
On Thu, Jul 03, 2003 at 06:28:33PM +1000, Eric Ball wrote:
> CFLAGS="-march=athlon-xp -O3 -pipe -mcpu=athlon-xp -m3dnow -mmmx -msse 
> -mfpmath=sse,387 -finline-functions -fmerge-all-constants -fthread-jumps 
> -fomit-frame-pointer -fexpensive-optimizations -ffast-math -fforce-addr 
> -falign-functions=64 -falign-jumps=4 -falign-loops=4 -frerun-cse-after-loop 
> -frerun-loop-opt -fprefetch-loop-arrays -maccumulate-outgoing-args"
> 
> Which contains some duplications but _seems_ to work perfectly. Note
> this will probably make people cry "Are you crazy and/or stupid!?" and
> developers will likely refuse to do troubleshooting on any problems
> you may have.

For your list of CFLAGS there, I'd advise you to read what the gcc
manpage has on them. Some of them are ok, but solely due the following
ones, I personally as a developer wouldn't support your bugs until you
recompiled without them.

-fmerge-all-constants - "using this option will result in non-conforming
behavior."

-fomit-frame-pointer - "It also makes debugging impossible on some
machines." (this is even in bold in the manpage)

-ffast-math - "it can result in incorrect output for programs which
depend on an exact implementation of IEEE or ISO rules/specifications
for math functions."

The most of the rest of your CFLAGS I would consider as fine, and just a
waste of your own time in compiling things (but hey, it is _your_ time
you are wasting).

-- 
Robin Hugh Johnson
E-Mail : [EMAIL PROTECTED]
Home Page  : http://www.orbis-terrarum.net/?l=people.robbat2
ICQ#   : 30269588 or 41961639
GnuPG FP   : 11AC BA4F 4778 E3F6 E4ED  F38E B27B 944E 3488 4E85


pgp0.pgp
Description: PGP signature


Re: [gentoo-user] The age old (CFLAGS) question..

2003-07-03 Thread Chris I
On 2003.07.03 04:28, Eric Ball wrote:
My CFLAGS for an Athlon XP 1800+ are:

CFLAGS="-march=athlon-xp -O3 -pipe -mcpu=athlon-xp -m3dnow -mmmx -
msse -mfpmath=sse,387 -finline-functions -fmerge-all-constants
-fthread-jumps -fomit-frame-pointer -fexpensive-optimizations
-ffast-math -fforce-addr -falign-functions=64 -falign-jumps=4
-falign-loops=4 -frerun-cse-after-loop -frerun-loop-opt
-fprefetch-loop-arrays -maccumulate-outgoing-args"
Which contains some duplications but _seems_ to work perfectly. Note
this will probably make people cry "Are you crazy and/or stupid!?" 
and developers will likely refuse to do troubleshooting on any 
problems you may have.
Are you crazy and/or stupid!?

I never had much of a glance at CFLAGS beyond the basics. 
Anyway, Eric is right in that Duron's are scaled down athlons, the 
question is just making sure generation to set your flags properly. 
drewbian: you could always find out by checking the contents of /proc/
cpucore, and looking those up on amd's website or google.

I figure I'd just let you know about my flags since it is what you 
asked. Just the basics, but it works fine for me:

-march=athlon-tbird -O3 -pipe -fomit-frame-pointer

Good luck.

-Chris I

FROM THE DESK OF
Dorothy Gale
Auntie Em:
Hate you.
Hate Kansas.
Taking the dog.
Dorothy

pgp0.pgp
Description: PGP signature


Re: [gentoo-user] The age old (CFLAGS) question..

2003-07-03 Thread drewbian
On Thu, 2003-07-03 at 18:28, Eric Ball wrote:
> On Thu, 3 Jul 2003 12:42 pm, drewbian wrote to gentoo-user:
> 
> > > After looking through the huge array of optimizations people have posted
> > > on the discussion forum's I'm rather confused as to what the hey to put
> > > in there. Particularly as most posters seem to use Pent 4's or Athlon
> > > XP's,
> > >
> > > Also would -march=athlon be the most suitable for a Duron 1.3?
> 
> I understand that Morgan-core Durons (the >1GHz ones I believe) are just 
> Athlon-XP's with less cache, so you can use -march=athlon-xp which will be 
> (slightly) faster.
> 
> My CFLAGS for an Athlon XP 1800+ are:
> 
> CFLAGS="-march=athlon-xp -O3 -pipe -mcpu=athlon-xp -m3dnow -mmmx -msse 
> -mfpmath=sse,387 -finline-functions -fmerge-all-constants -fthread-jumps 
> -fomit-frame-pointer -fexpensive-optimizations -ffast-math -fforce-addr 
> -falign-functions=64 -falign-jumps=4 -falign-loops=4 -frerun-cse-after-loop 
> -frerun-loop-opt -fprefetch-loop-arrays -maccumulate-outgoing-args"
> 
> Which contains some duplications but _seems_ to work perfectly. Note this will 
> probably make people cry "Are you crazy and/or stupid!?" and developers will 
> likely refuse to do troubleshooting on any problems you may have.
> 
> -Eric
Thanks for replying,

Man, that's a lot of cflags ;) I"m going to try err toward the
conservative but this will give me lots to muck around with.

The -march=athlon-xp bit is particularly interesting. I only had
-mach=athlon in make.conf before.

drewbian

   __   
   ___  __/ /_   
  / _ \___  ___/_  __/  ___ -o)   
  \_  / _ \/ _ \/   _ \/ _ \   (o-  / \  -o) 
   /_/\_//___/\___/\___/   (\_ _\_V  _\)   
 GNU/LINUX DESKTOP - never be alone again...   





signature.asc
Description: This is a digitally signed message part


Re: [gentoo-user] The age old (CFLAGS) question..

2003-07-03 Thread Eric Ball
On Thu, 3 Jul 2003 12:42 pm, drewbian wrote to gentoo-user:

> > After looking through the huge array of optimizations people have posted
> > on the discussion forum's I'm rather confused as to what the hey to put
> > in there. Particularly as most posters seem to use Pent 4's or Athlon
> > XP's,
> >
> > Also would -march=athlon be the most suitable for a Duron 1.3?

I understand that Morgan-core Durons (the >1GHz ones I believe) are just 
Athlon-XP's with less cache, so you can use -march=athlon-xp which will be 
(slightly) faster.

My CFLAGS for an Athlon XP 1800+ are:

CFLAGS="-march=athlon-xp -O3 -pipe -mcpu=athlon-xp -m3dnow -mmmx -msse 
-mfpmath=sse,387 -finline-functions -fmerge-all-constants -fthread-jumps 
-fomit-frame-pointer -fexpensive-optimizations -ffast-math -fforce-addr 
-falign-functions=64 -falign-jumps=4 -falign-loops=4 -frerun-cse-after-loop 
-frerun-loop-opt -fprefetch-loop-arrays -maccumulate-outgoing-args"

Which contains some duplications but _seems_ to work perfectly. Note this will 
probably make people cry "Are you crazy and/or stupid!?" and developers will 
likely refuse to do troubleshooting on any problems you may have.

-Eric
-- 
I know it all.  I just can't remember it all at once.


--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] The age old (CFLAGS) question..

2003-07-03 Thread drewbian
On Thu, 2003-07-03 at 17:42, MAL wrote:
> drewbian wrote:
> > Hi all,
> > 
> > Any one here have a nice stable yet fast CFLAGS=" " section suitable for
> > a duron 1.3ghz they could possibly paste? (pretty big ask I know ;))
> 
> CFLAGS="-march=athlon -O3 -pipe"
> ... is safe and fast.
> Don't forget to set CXXFLAGS to equal CFLAGS.
> 
> Then:
> man gcc
> 
> and go to:
> http://www.freehackers.org/gentoo/gccflags/flag_gcc3.html
> 
> MAL
> 
> 
> --
> [EMAIL PROTECTED] mailing list
> 
> 

Nice link, exactly what I was looking for thx. 


--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] The age old (CFLAGS) question..

2003-07-03 Thread drewbian
sorry I should have had a more descriptive subject..
Hi all,
> 
> Any one here have a nice stable yet fast CFLAGS=" " section suitable for
> a duron 1.3ghz they could possibly paste? (pretty big ask I know ;))
> 
> After looking through the huge array of optimizations people have posted
> on the discussion forum's I'm rather confused as to what the hey to put
> in there. Particularly as most posters seem to use Pent 4's or Athlon
> XP's, 
> 
> Also would -march=athlon be the most suitable for a Duron 1.3?
> 
> heres the output of cat /proc/cpu
> 
> processor   : 0
> vendor_id   : AuthenticAMD
> cpu family  : 6
> model   : 7
> model name  : AMD Duron(tm) Processor 
> stepping: 1
> cpu MHz : 1313.066
> cache size  : 64 KB
> fdiv_bug: no
> hlt_bug : no
> f00f_bug: no
> coma_bug: no
> fpu : yes
> fpu_exception   : yes
> cpuid level : 1
> wp  : yes
> flags   : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca
> cmov pat pse36 mmx fxsr sse syscall mmxext 3dnowext 3dnow
> bogomips: 2614.88
> 
> Hopefully someone will put us gentoo noobs out of our misery and write
> up a definiative guide one of these days ;) *crosses fingers*



--
[EMAIL PROTECTED] mailing list