Re: panic during make depend

2000-03-16 Thread Jeffrey J. Mountin

At 11:01 PM 3/15/00 -0500, Donn Miller wrote:
>Sounds like one of those nasty gcc optimization bugs.  I generally
>build my kernel and world with -mpentium -O3 -pipe, and I haven't seen
>any bugs at all.  I build everything with these flags without
>problems.  The only problems I've see, as mentioned previously, was in
>building Qt.  I've gotten an "Internal compiler error" with those
>flags, but reverting to what Troll put in qt/configs solved the
>problems.  Apparently, there's both compile-time and run-time bugs
>with gcc's opt. code.

It might be, but I'm backing off from -02 to -O for a dozen builds or so 
and see.  Less if panics keep coming, then the -march will be dropped.  All 
good then back to -02 and try -mcpu.

>I think there are some bugs with the pentium-specific flags in gcc,
>excluding the generic-pentium flag of -mpentium.  I would try using
>-mpentium -O3 -pipe --- I'm pretty confident that will solve your
>problems, and you can still get generic pentium optimization levels.

Why use -O3, which adds -finline-functions.  AFAICR, that one isn't very 
liked by those more with more knowledge and experience.

>Of course, I don't really know if there's anything to be gained by
>using these flags over the stock -O -pipe -- but I do it anyways for
>the psychological reassurance (placebo effect).  I definitely think
>building XFree86 with pentium opt. is a great idea.  But with
>buildworld and buildkernel, my advice would be to just use -mpentium,
>as it's probably the "happiest medium" between pentium opt. and
>stability.  From what I've heard, compiling mission critical stuff
>with -mpentiumpro is a bad idea.  Hmmm... didn't -mpentiumpro come
>from pgcc?  I think the best place to use -mpentiumpro is in compiling
>multimedia type stuff, where stability isn't important but speed is.

Don't think your reasoning is all that sound as a "reassurance," but 
ensuring that code is optimized for the CPU, and in my case architecture, 
is good.

Originally thought that using -march would speed up compiling for one and 
another to have more specific code for the system running it.  Been a while 
since I had a running 486, 8+ years since even seeing a 386, and only have 
2 pentiums in operation, so why should the code have instructions for 
running on any of these platforms?

As an example I've seen many posts with -mno-486 used.  The man page is 
clear as mud on what that does.  From the wording it should optimize the 
code for a 386 then:

  -mno-486
   Control  whether or not code is optimized for a 486
   instead of an 386.  Code generated for a  486  will
   run on a 386 and vice versa.

Perhaps the man pages need updating.

>Basically, gcc is a very good compiler.  But, it isn't exactly the
>best compiler to use for optimization.  Someone told me that Sun's and
>DEC's compilers, for example, blow away gcc in terms of speed.  But,
>they aren't portable.

The DEC compiler might be good for some FBSD users.


Jeff Mountin - [EMAIL PROTECTED]
Systems/Network Administrator
FreeBSD - the power to serve



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: panic during make depend

2000-03-15 Thread Peter Jeremy

On 2000-Mar-16 15:04:00 +1100, Donn Miller <[EMAIL PROTECTED]> wrote:
>Basically, gcc is a very good compiler.  But, it isn't exactly the
>best compiler to use for optimization.  Someone told me that Sun's and
>DEC's compilers, for example, blow away gcc in terms of speed.  But,
>they aren't portable.

I think it's very dependent on the target architecture and how popular
that architecture is.  Traditionally, the M68K and SPARC families were
the most popular, and gcc generated the best (or equal best) code on
them.  The i386 is now a more popular family but, at the high end,
optimisation is restricted by the difficulty of obtaining accurate
documentation.

The Alpha is a very difficult processor to generate good code for
(and I suspect the IA64 will be worse).  DEC (and now Compaq) have
put a lot of effort into tweaking their compiler - I don't believe
anything like the same amount of effort has been expended on the
gcc backend (and I wouldn't expect it).

Peter


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: panic during make depend

2000-03-15 Thread Donn Miller

"Jeffrey J. Mountin" wrote:

> Successfully did a buildworld with -O -pipe -march=pentiumpro, installworld
> was good, remade /dev and built a generic kernel.  Config'd my local kernel
> and within the first few lines of 'make depend' it bombed:

Sounds like one of those nasty gcc optimization bugs.  I generally
build my kernel and world with -mpentium -O3 -pipe, and I haven't seen
any bugs at all.  I build everything with these flags without
problems.  The only problems I've see, as mentioned previously, was in
building Qt.  I've gotten an "Internal compiler error" with those
flags, but reverting to what Troll put in qt/configs solved the
problems.  Apparently, there's both compile-time and run-time bugs
with gcc's opt. code.

I think there are some bugs with the pentium-specific flags in gcc,
excluding the generic-pentium flag of -mpentium.  I would try using
-mpentium -O3 -pipe --- I'm pretty confident that will solve your
problems, and you can still get generic pentium optimization levels.

Of course, I don't really know if there's anything to be gained by
using these flags over the stock -O -pipe -- but I do it anyways for
the psychological reassurance (placebo effect).  I definitely think
building XFree86 with pentium opt. is a great idea.  But with
buildworld and buildkernel, my advice would be to just use -mpentium,
as it's probably the "happiest medium" between pentium opt. and
stability.  From what I've heard, compiling mission critical stuff
with -mpentiumpro is a bad idea.  Hmmm... didn't -mpentiumpro come
from pgcc?  I think the best place to use -mpentiumpro is in compiling
multimedia type stuff, where stability isn't important but speed is. 

Basically, gcc is a very good compiler.  But, it isn't exactly the
best compiler to use for optimization.  Someone told me that Sun's and
DEC's compilers, for example, blow away gcc in terms of speed.  But,
they aren't portable.


- Donn


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message