Re: gcc -Os optimisation broken (RELENG_4)

2000-03-20 Thread Thomas Köllmann

David O'Brien wrote/schrieb (Saturday, March 18, 2000):

| On Sat, Mar 18, 2000 at 03:18:45AM +0100, Thomas Köllmann wrote:
|  | Perhaps this is a bit off topic, but can the pentium optimisations be
|  | used for AMD K6 processors?
|  
|  I did a `make world' yesterday with 
|  CFLAGS= -O2 -pipe -march=pentium
|  COPTFLAGS=  -O2 -pipe -march=pentium
| ..snip..
|  If it doesn't I'll probably try `-03 -pipe -march=pentium' come next
| 
| What are people hoping to get by doing this?  Are you actually doing a
| scientific performance evaluation between the various optimization
| options???  

This is just playing, the machine I was talking about has it's
backups in order and can afford downtime; I mentioned that already,
and I was only answering somebody's question. 

| Are are people just being macho, and thinking they are
| getting all this non-existent performance increase?  

You _are_ feeling strong about this, aren't you? :-)

| "-O" is the only globally safe optimization on FreeBSD.  -O2, etc..
| causes various problems for various people in various ports, and parts of
| /usr/src/.  If people are using these options just for fun, that is fine,

Yes, just for fun, David, just for fun.

| BUT if you experience *any* problems with compiling using -O2, etc..
| don't bug this list -- go bug the GCC people.

Are they a bunch of machos themselves? :-)

Thanks for your point of view.
Gruß
 - Thomas

-- 
Walking to the car, she takes his hand and puts it, for a moment,
lightly between her moving legs. Roger's heart grows erect, and comes.
That's really how it feels. -- Thomas Pynchon, Gravity's Rainbow
# PGP key sent on request / PGP key auf Wunsch per e-mail


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



Re: gcc -Os optimisation broken (RELENG_4)

2000-03-18 Thread Thomas Köllmann

I wrote/schrieb (Saturday, March 18, 2000):

| R Joseph Wright wrote/schrieb (Friday, March 17, 2000):
| 
| |  In contrast, I've been using -Os -march=pentium during the last three
| |  months for buildworld and the kernel. Never had problems whatsoever.
| | 
| | Perhaps this is a bit off topic, but can the pentium optimisations be used
| | for AMD K6 processors?
| 
| I did a `make world' yesterday with 
| CFLAGS= -O2 -pipe -march=pentium
| COPTFLAGS=  -O2 -pipe -march=pentium
| (inspired by recent mention of optimizing on this list) on my
| AMD-K6(tm) 3D processor (350.80-MHz 586-class CPU)
| desktop machine. It still runs, but I'll have yet to see whether
| this will cause any suspicious behaviour. [...]

I've just learned that there is a `-march=k6' even though the man
page for gcc-2.95.1 does not mention it...

Gruß
 - Thomas

-- 
Den Wein, den listigen Tröster bat ich oft, | - Charles
Einmal das Schrecknis, das mich quält, zu stillen,  | Baudelaire,
Jedoch er schärft den Sinn, statt zu verhüllen  | Die Blutquelle
# PGP key sent on request / PGP key auf Wunsch per e-mail


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



Re: gcc -Os optimisation broken (RELENG_4)

2000-03-18 Thread Maxim Sobolev

Thomas Köllmann wrote:

 I wrote/schrieb (Saturday, March 18, 2000):

 | R Joseph Wright wrote/schrieb (Friday, March 17, 2000):
 |
 | |  In contrast, I've been using -Os -march=pentium during the last three
 | |  months for buildworld and the kernel. Never had problems whatsoever.
 | |
 | | Perhaps this is a bit off topic, but can the pentium optimisations be used
 | | for AMD K6 processors?
 |
 | I did a `make world' yesterday with
 | CFLAGS= -O2 -pipe -march=pentium
 | COPTFLAGS=  -O2 -pipe -march=pentium
 | (inspired by recent mention of optimizing on this list) on my
 | AMD-K6(tm) 3D processor (350.80-MHz 586-class CPU)
 | desktop machine. It still runs, but I'll have yet to see whether
 | this will cause any suspicious behaviour. [...]

 I've just learned that there is a `-march=k6' even though the man
 page for gcc-2.95.1 does not mention it...

GNU folks are very reluctant in respect of updating man pages (they think that man
pages is obsolete feature). If you would look into gcc man page thoroughly you
could find following disclaimer in its very beginning:

  This  man  page  is not kept up to date except when volun-
   teers want to maintain it.   If  you  find  a  discrepancy
   between  the  man  page and the software, please check the
   Info file, which is the authoritative documentation.

Therefore if you want to learn about new options and optimisations than it would
be better to read info pages instead (info gcc).

-Maxim



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



Re: gcc -Os optimisation broken (RELENG_4)

2000-03-18 Thread David O'Brien

On Sat, Mar 18, 2000 at 03:18:45AM +0100, Thomas Köllmann wrote:
 | Perhaps this is a bit off topic, but can the pentium optimisations be used
 | for AMD K6 processors?
 
 I did a `make world' yesterday with 
 CFLAGS= -O2 -pipe -march=pentium
 COPTFLAGS=  -O2 -pipe -march=pentium
..snip..
 If it doesn't I'll probably try `-03 -pipe -march=pentium' come next


What are people hoping to get by doing this?  Are you actually doing a
scientific performance evaluation between the various optimization
options???  Are are people just being macho, and thinking they are
getting all this non-existent performance increase?  

"-O" is the only globally safe optimization on FreeBSD.  -O2, etc..
causes various problems for various people in various ports, and parts of
/usr/src/.  If people are using these options just for fun, that is fine,
BUT if you experience *any* problems with compiling using -O2, etc..
don't bug this list -- go bug the GCC people.

-- 
-- David([EMAIL PROTECTED])


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



Re: gcc -Os optimisation broken (RELENG_4)

2000-03-18 Thread Donn Miller

David O'Brien wrote:
 
 On Sat, Mar 18, 2000 at 03:18:45AM +0100, Thomas Köllmann wrote:

  If it doesn't I'll probably try `-03 -pipe -march=pentium' come next
 
 What are people hoping to get by doing this?  Are you actually doing a
 scientific performance evaluation between the various optimization
 options???  Are are people just being macho, and thinking they are
 getting all this non-existent performance increase?

It's probably more of a "placebo effect", which makes you think your
are getting a big boost in performance.  I'll admit that I've never
seen a whole order or magnitude increase in performance between -O and
-mpentium-O3, or whatever - it probably gives you boosts here and
there.  Optimization is pretty good, as I've found out, with
plain-jane -O.  Beyond that, I think your performance gains are
minimal.
 
And yes, I think it's really macho to be usin' hopped-up CFLAGS, like
-march=pentium -Os -pipe.  I feel really studly doing this. :-)  We
should do a survey, and find out what the guys use for CFLAGS and
COPTFLAGS and compare them to what the female users are using.  That
would be interesting.

I don't know, -O seems to be doing some pretty decent optimization,
from what I've seen of the assembler output.  I guess you're right in
that all higher optimization are prividing marginal performance
gains.  From what I gather, the i386 arch. is not very sensitive to
optimization from gcc.  You'll see minor boosts here and there, but
that's about it.

Typically, guys that are diehard football fans like to use -mpentium
-O3 -pipe for building world and kernel.

- Donn


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



Re: gcc -Os optimisation broken (RELENG_4)

2000-03-18 Thread Jacob A. Hart

Donn Miller wrote:

 It's probably more of a "placebo effect", which makes you think your
 are getting a big boost in performance.  I'll admit that I've never
 seen a whole order or magnitude increase in performance between -O and
 -mpentium-O3, or whatever - it probably gives you boosts here and
 there.  Optimization is pretty good, as I've found out, with
 plain-jane -O.  Beyond that, I think your performance gains are
 minimal.
 
 And yes, I think it's really macho to be usin' hopped-up CFLAGS, like
 -march=pentium -Os -pipe.  I feel really studly doing this. :-)

Damn straight!

But you ain't seen nothing yet...

 We should do a survey, and find out what the guys use for CFLAGS and
 COPTFLAGS and compare them to what the female users are using.  That
 would be interesting.

Let's get the ball rolling then, shall we?

CFLAGS/COPTFLAGS for day-to-day compiles (kernel, X, world, etc.):
-O3 -march=pentiumpro -malign-double -fomit-frame-pointer -funroll-loops
-fstrict-aliasing -pipe

CFLAGS when I *REALLY* feel the need for speed (lame, mpg123, xmame,
etc.):
-O3 -march=pentiumpro -malign-double -malign-loops=4 -malign-jumps=4
-malign-functions=4 -fomit-frame-pointer -ffast-math -funroll-loops
-fstrict-aliasing -pipe

-O2 used to be my switch of choice so the -funroll-loops flag in the
above strings may be redundant (can't remember).  Considering, though,
that the length of one's CFLAGS variable is directly proportional to
studliness, I have little choice but to leave it there ;-)

Can't say that I care for football, though.

 - Donn

-jake
[EMAIL PROTECTED]


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



Re: gcc -Os optimisation broken (RELENG_4)

2000-03-17 Thread Sascha Schumann

On Thu, Mar 16, 2000 at 10:09:37PM -0800, Doug Barton wrote:
 Donn Miller wrote:
  
  Doug Barton wrote:
  
   Hmm... If I have a PII (Actually celeron 300A) or a PIII, which is
   better, 'pentium' or 'pentiumpro'? I would think the latter, but I've
   learned not to assume where gcc is concerned.
  
  I think that 'pentium' would result in code that isn't as optimized as
  'pentiumpro', but I've heard that 'pentium' has a lot less problems.
  
   Also, I have heard conflicting reports as to whether compiling the
   kernel/world with optimisations is a good thing. Anyone care to (re)open
   that can of worms?
  
  I compile my kernel/world with -mpentium -O3 -pipe.  The only problem
  I've seen so far were spurious random reboots that would occur about
  2-3 times a month.  But, that was last summer, and hasn't happened
  since.  Something else must have been the culprit.  (Maybe -current
  wasn't as stable last summer.)  With the aforementioned CFLAGS, I have
  a pretty reliable and stable system.
  
  I've heard that -mpentiumpro can be pretty buggy, and it can actually
  result in slower code than -mpentium for certain pentium types.  I
  trust plain -mpentium, as it has been very reliable for me, except for
  some compile-time errors caused by the optimization (Qt).
 
   In the interests of providing another datapoint, I tried my old, boring
 P5 machine, and with -Os -march=pentium buildworld bombed trying to
 compile cc1plus in the build tools phase. Backing off to -O worked. The
 kernel was ok with -Os -march=pentium. 

In contrast, I've been using -Os -march=pentium during the last three
months for buildworld and the kernel. Never had problems whatsoever.

- Sascha


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



Re: gcc -Os optimisation broken (RELENG_4)

2000-03-17 Thread Alexander Leidinger

On 16 Mar, Doug Barton wrote:

   In the interests of providing another datapoint, I tried my old, boring
 P5 machine, and with -Os -march=pentium buildworld bombed trying to
 compile cc1plus in the build tools phase. Backing off to -O worked. The
 kernel was ok with -Os -march=pentium. 

As it seems everyone is posting his/her C{,OPT}FLAGS:
I'm using
-Os -march=pentiumpro -pipe -Wall -funroll-loops -fschedule-insns2
since months (~ a half year ore more) without a problem (at least I
didn't notice one) on a Celeron.

Bye,
Alexander.

-- 
The dark ages were caused by the Y1K problem.

http://www.Leidinger.net  Alexander+Home @ Leidinger.net
  Key fingerprint = 7423 F3E6 3A7E B334 A9CC  B10A 1F5F 130A A638 6E7E



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



Re: gcc -Os optimisation broken (RELENG_4)

2000-03-17 Thread Daniel C. Sobral

Maxim Sobolev wrote:
 
 I've just upgraded my production server to the 4.0-RELEASE and found that
 squid23 when compiled with -Os option dying with signal 11 on each attempt to
 load page. When I recompiled it with -O fault disappeared. After some digging
 into the sources with gdb I found that fault came from dereferencing NULL
 pointer somewhere in the DNS query procedures. I've tracked the source of this
 pointer and found that the function rfc1035QuestionPack (rfc1035.c) called from
 rfc1035BuildAQuery receives NULL pointer instead of the supplied hostname as a
 3rd argument. Following is two debugging sessions with squid compiled with -Os
 and -O (faulty call is in the end of the output):

Well... where is "name" being set? That would help.

--
Daniel C. Sobral(8-DCS)
[EMAIL PROTECTED]
[EMAIL PROTECTED]

One Unix to rule them all, One Resolver to find them,
One IP to bring them all and in the zone bind them.


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



Re: gcc -Os optimisation broken (RELENG_4)

2000-03-17 Thread Daniel C. Sobral

Maxim Sobolev wrote:
 
  Well... where is "name" being set? That would help.
 
 It is not clear what do you mean, please explain.

"name" is the name of the variable that is passed as NULL when compiled
with -Os. In the code trace you posted, we do not see any reference to
this variable up to the point where the function is called.

--
Daniel C. Sobral(8-DCS)
[EMAIL PROTECTED]
[EMAIL PROTECTED]

One Unix to rule them all, One Resolver to find them,
One IP to bring them all and in the zone bind them.


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



Re: gcc -Os optimisation broken (RELENG_4)

2000-03-17 Thread R Joseph Wright

 
 In contrast, I've been using -Os -march=pentium during the last three
 months for buildworld and the kernel. Never had problems whatsoever.

Perhaps this is a bit off topic, but can the pentium optimisations be used
for AMD K6 processors?




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



Re: gcc -Os optimisation broken (RELENG_4)

2000-03-17 Thread Maxim Sobolev

"Daniel C. Sobral" wrote:

 Maxim Sobolev wrote:
 
  I've just upgraded my production server to the 4.0-RELEASE and found that
  squid23 when compiled with -Os option dying with signal 11 on each attempt to
  load page. When I recompiled it with -O fault disappeared. After some digging
  into the sources with gdb I found that fault came from dereferencing NULL
  pointer somewhere in the DNS query procedures. I've tracked the source of this
  pointer and found that the function rfc1035QuestionPack (rfc1035.c) called from
  rfc1035BuildAQuery receives NULL pointer instead of the supplied hostname as a
  3rd argument. Following is two debugging sessions with squid compiled with -Os
  and -O (faulty call is in the end of the output):

 Well... where is "name" being set? That would help.

It is not clear what do you mean, please explain.

-Maxim



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



Re: gcc -Os optimisation broken (RELENG_4)

2000-03-17 Thread Thomas Köllmann

R Joseph Wright wrote/schrieb (Friday, March 17, 2000):

|  In contrast, I've been using -Os -march=pentium during the last three
|  months for buildworld and the kernel. Never had problems whatsoever.
| 
| Perhaps this is a bit off topic, but can the pentium optimisations be used
| for AMD K6 processors?

I did a `make world' yesterday with 
CFLAGS= -O2 -pipe -march=pentium
COPTFLAGS=  -O2 -pipe -march=pentium
(inspired by recent mention of optimizing on this list) on my
AMD-K6(tm) 3D processor (350.80-MHz 586-class CPU)
desktop machine. It still runs, but I'll have yet to see whether
this will cause any suspicious behaviour. 

If it doesn't I'll probably try `-03 -pipe -march=pentium' come next
`make world' time, but this all is about a machine that has it's
backup mechanisms (hopefully) and can afford a little downtime.

Gruß
 - Thomas

-- 
On the way downtown I stopped at a bar and had a couple of double
Scotches. They didn't do me any good. All they did was make me think of
Silver-Wig, and I never saw her again. -- Raymond Chandler, The Big Sleep
# PGP key sent on request / PGP key auf Wunsch per e-mail


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



Re: gcc -Os optimisation broken (RELENG_4)

2000-03-16 Thread David O'Brien

 
 I think that 'pentium' would result in code that isn't as optimized as
 'pentiumpro', but I've heard that 'pentium' has a lot less problems.

What???  'pentiumpro' code isn't going to be very optimized for a Pentium
(if it even runs at all).

 I've heard that -mpentiumpro can be pretty buggy, and it can actually
 result in slower code than -mpentium for certain pentium types.

Yea like the original P5 Pentiums.  You should match the command line
with your actual machine if you are going to use these options.

-- 
-- David([EMAIL PROTECTED])


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



Re: gcc -Os optimisation broken (RELENG_4)

2000-03-16 Thread Christian Weisgerber

Doug Barton [EMAIL PROTECTED] wrote:

   Hmm... If I have a PII (Actually celeron 300A) or a PIII, which is
 better, 'pentium' or 'pentiumpro'? I would think the latter, but I've

I have to admit that I kind of lost track of Intel's Pentium du
jour offerings after the PPro, but I think PII and PIII use i686
cores or at least something closest to i686, so I'd use -mpentiumpro
there. I don't pretend to have any idea what's appropriate for the
various AMD/Cyrix/IDT/etc processors.

The machines where I use -mpentium and -mpentiumpro, respectively,
are an actual Intel Pentium and a (dual) Intel Pentium Pro. Yes,
there are people out there who don't buy a new machine each quarter.

   Also, I have heard conflicting reports as to whether compiling the
 kernel/world with optimisations is a good thing. Anyone care to (re)open
 that can of worms?

No new worms in there, I suspect.

-- 
Christian "naddy" Weisgerber  [EMAIL PROTECTED]



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



Re: gcc -Os optimisation broken (RELENG_4)

2000-03-16 Thread Christian Weisgerber

David O'Brien [EMAIL PROTECTED] wrote:

 What???  'pentiumpro' code isn't going to be very optimized for a Pentium
 (if it even runs at all).

According to the gcc(1) man page, -mpentiumpro is synonymous to
-mcpu=pentiumpro, which only affects instruction scheduling but
not the actual instruction set used (for that, use -march=...).
So it certainly should run.

If you are aware that the man page is wrong in this respect, please
tell us!

-- 
Christian "naddy" Weisgerber  [EMAIL PROTECTED]



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



Re: gcc -Os optimisation broken (RELENG_4)

2000-03-16 Thread Jeffrey J. Mountin

At 01:42 PM 3/16/00 +0100, Christian Weisgerber wrote:
David O'Brien [EMAIL PROTECTED] wrote:

  What???  'pentiumpro' code isn't going to be very optimized for a Pentium
  (if it even runs at all).

According to the gcc(1) man page, -mpentiumpro is synonymous to
-mcpu=pentiumpro, which only affects instruction scheduling but
not the actual instruction set used (for that, use -march=...).
So it certainly should run.

If you are aware that the man page is wrong in this respect, please
tell us!

Wondering why one would use -mcpu and not -march.  If the code runs only on 
Celerons, PII's, and PIII's why would one *not* use -march.

I'm curious about (possible) breakages with -mcpu or -march compared to -Ox 
settings which seem to break things more often than -O.  Only ask, since 
-Ox and individual flags (rather than the mulititude added going from -O to 
-O2) are used far more often.


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: gcc -Os optimisation broken (RELENG_4)

2000-03-16 Thread Doug Barton

Donn Miller wrote:
 
 Doug Barton wrote:
 
  Hmm... If I have a PII (Actually celeron 300A) or a PIII, which is
  better, 'pentium' or 'pentiumpro'? I would think the latter, but I've
  learned not to assume where gcc is concerned.
 
 I think that 'pentium' would result in code that isn't as optimized as
 'pentiumpro', but I've heard that 'pentium' has a lot less problems.
 
  Also, I have heard conflicting reports as to whether compiling the
  kernel/world with optimisations is a good thing. Anyone care to (re)open
  that can of worms?
 
 I compile my kernel/world with -mpentium -O3 -pipe.  The only problem
 I've seen so far were spurious random reboots that would occur about
 2-3 times a month.  But, that was last summer, and hasn't happened
 since.  Something else must have been the culprit.  (Maybe -current
 wasn't as stable last summer.)  With the aforementioned CFLAGS, I have
 a pretty reliable and stable system.
 
 I've heard that -mpentiumpro can be pretty buggy, and it can actually
 result in slower code than -mpentium for certain pentium types.  I
 trust plain -mpentium, as it has been very reliable for me, except for
 some compile-time errors caused by the optimization (Qt).

In the interests of providing another datapoint, I tried my old, boring
P5 machine, and with -Os -march=pentium buildworld bombed trying to
compile cc1plus in the build tools phase. Backing off to -O worked. The
kernel was ok with -Os -march=pentium. 

Hope someone is finding this useful,

Doug
-- 
"While the future's there for anyone to change, still you know it seems, 
 it would be easier sometimes to change the past"

 - Jackson Browne, "Fountain of Sorrow"


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



Re: gcc -Os optimisation broken (RELENG_4)

2000-03-16 Thread Doug Barton

On Thu, 16 Mar 2000, Jeffrey J. Mountin wrote:

 Wondering why one would use -mcpu and not -march.  If the code runs only on 
 Celerons, PII's, and PIII's why would one *not* use -march.
 
 I'm curious about (possible) breakages with -mcpu or -march compared to -Ox 
 settings which seem to break things more often than -O.  Only ask, since 
 -Ox and individual flags (rather than the mulititude added going from -O to 
 -O2) are used far more often.

Eager to fire my new-found gun in the direction of my feet I built
world and kernel last night with -0s -march=pentium. So far so good
(although I haven't given it a real workout yet). Now that I now
'pentiumpro' should be a better choice, I'll give that a whirl
tonight. After reading the man page I had to agree with your point that
-march seemed like a better option, and I don't have cross-platform issues
to deal with here.

Doug
-- 
"While the future's there for anyone to change, still you know it seems, 
 it would be easier sometimes to change the past"

 - Jackson Browne, "Fountain of Sorrow"



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



Re: gcc -Os optimisation broken (RELENG_4)

2000-03-15 Thread Dan Nelson

In the last episode (Mar 15), Maxim Sobolev said:
 I've just upgraded my production server to the 4.0-RELEASE and found
 that squid23 when compiled with -Os option dying with signal 11 on
 each attempt to load page. When I recompiled it with -O fault
 disappeared. After some digging into the sources with gdb I found

This is just a 'me too'.  I get it with -O2 (-Os implies -O2, so it's
probably the same problem). 

-- 
Dan Nelson
[EMAIL PROTECTED]


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



Re: gcc -Os optimisation broken (RELENG_4)

2000-03-15 Thread Donn Miller

Dan Nelson wrote:
 
 In the last episode (Mar 15), Maxim Sobolev said:
  I've just upgraded my production server to the 4.0-RELEASE and found
  that squid23 when compiled with -Os option dying with signal 11 on
  each attempt to load page. When I recompiled it with -O fault
  disappeared. After some digging into the sources with gdb I found
 
 This is just a 'me too'.  I get it with -O2 (-Os implies -O2, so it's
 probably the same problem).


I've noticed various compile-time optimization bugs as well.  For
example, I tried building Qt with -mpentium -O3 -pipe, and somewhere
during the build, I get "Internal compiler error."  Falling back to
the stock optimization levels of -O2 fixed this.

- Donn


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



Re: gcc -Os optimisation broken (RELENG_4)

2000-03-15 Thread Maxim Sobolev

Dan Nelson wrote:

 In the last episode (Mar 15), Maxim Sobolev said:
  I've just upgraded my production server to the 4.0-RELEASE and found
  that squid23 when compiled with -Os option dying with signal 11 on
  each attempt to load page. When I recompiled it with -O fault
  disappeared. After some digging into the sources with gdb I found

 This is just a 'me too'.  I get it with -O2 (-Os implies -O2, so it's
 probably the same problem).

Any comments from the "compiler gurus"?

-Maxim



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



Re: gcc -Os optimisation broken (RELENG_4)

2000-03-15 Thread David O'Brien

On Wed, Mar 15, 2000 at 10:51:55AM -0600, Dan Nelson wrote:
 I get it with -O2 (-Os implies -O2, so it's probably the same problem). 

Not quite.  -0s == all the -O2 optimizations that do not increase code
size.  -Os can also perform other optimizations not part of -O2 that
decrease code size.  The -Os == -O2 only tells you how "risky" in
optimizing -Os is willing to be.
 
-- 
-- David([EMAIL PROTECTED])


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



Re: gcc -Os optimisation broken (RELENG_4)

2000-03-15 Thread Dan Nelson

In the last episode (Mar 15), David O'Brien said:
 On Wed, Mar 15, 2000 at 10:51:55AM -0600, Dan Nelson wrote:
  I get it with -O2 (-Os implies -O2, so it's probably the same
  problem).
 
 Not quite.  -0s == all the -O2 optimizations that do not increase
 code size.  -Os can also perform other optimizations not part of -O2
 that decrease code size.  The -Os == -O2 only tells you how "risky"
 in optimizing -Os is willing to be.

Too risky, apparently :)

Maxim: It looks like you've done quite a big of debugging already; can
you get this bug to appear in a small piece of code?  I'm sure the gcc
developers would be able to fix the problem pretty quickly if it's
easily reproducable.

-- 
Dan Nelson
[EMAIL PROTECTED]


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



Re: gcc -Os optimisation broken (RELENG_4)

2000-03-15 Thread Christian Weisgerber

Maxim Sobolev [EMAIL PROTECTED] wrote:

 I've just upgraded my production server to the 4.0-RELEASE and found that
 squid23 when compiled with -Os option dying with signal 11 on each attempt to
 load page. When I recompiled it with -O fault disappeared.

Which brings us back to the popular topic of which optimization
levels are reliable.

Building 5.0-CURRENT with "-Os -mpentium" failed for me with gas
complaining (unknown opcode I think, but don't hold me to it). I
went back to "-O -mpentium" and that worked fine. On another machine,
"-O2 -mpentiumpro" worked, too.

-- 
Christian "naddy" Weisgerber  [EMAIL PROTECTED]



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



Re: gcc -Os optimisation broken (RELENG_4)

2000-03-15 Thread Doug Barton

Christian Weisgerber wrote:
 
 Maxim Sobolev [EMAIL PROTECTED] wrote:
 
  I've just upgraded my production server to the 4.0-RELEASE and found that
  squid23 when compiled with -Os option dying with signal 11 on each attempt to
  load page. When I recompiled it with -O fault disappeared.
 
 Which brings us back to the popular topic of which optimization
 levels are reliable.
 
 Building 5.0-CURRENT with "-Os -mpentium" failed for me with gas
 complaining (unknown opcode I think, but don't hold me to it). I
 went back to "-O -mpentium" and that worked fine. On another machine,
 "-O2 -mpentiumpro" worked, too.

Hmm... If I have a PII (Actually celeron 300A) or a PIII, which is
better, 'pentium' or 'pentiumpro'? I would think the latter, but I've
learned not to assume where gcc is concerned.

Also, I have heard conflicting reports as to whether compiling the
kernel/world with optimisations is a good thing. Anyone care to (re)open
that can of worms?

Thanks,

Doug
-- 
  "While the future's there for anyone to change, still you know it
seems, 
   it would be easier sometimes to change the past"

   - Jackson Browne, "Fountain of Sorrow"


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