Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

port-i386/8364 (Re: usr.bin/rwho/Makefile, workaround PR#8364)



On Wed, Mar 01, 2000 at 01:54:26PM +0100, 
Havard.Eidnes%runit.sintef.no@localhost wrote:
> 
> CHANGES-1.4.2 entry:
> 
> usr.bin/rwho/Makefile                           patch
> 
>   Avoid optimizer bug in egcs for i386, works around PR#8364.
> 

Thanks for doing this.  This at least makes it work for 1.4.2.

I've taken some further time this morning working on isolating exactly
which option causes this.  After a little searching and test compliling,
I've found that it's the combination of the -fstrength-reduce, -fforce-mem,
and -fexpensive-optimizations options, all automatically turned on by -O2,
which cause the problem.  Thus,

CFLAGS="-O2 -fno-force-mem" works
CFLAGS="-O2 -fno-strength-reduce" works
CFLAGS="-O2 -fno-expensive-optimizations" works

but CFLAGS="-O -fforce-mem -fstrength-reduce -fexpensive-optimizations" does
not work.

This error report applies to both of the following versions of gcc:

release branch: gcc -v
Using builtin specs.
gcc version egcs-2.91.60 19981201 (egcs-1.1.1 release)

and current: gcc -v
Using builtin specs.
gcc version egcs-2.91.66 19990314 (egcs-1.1.2 release)

I seem to remember that historically, there was supposedly some problem with
gcc 2.7.x and -fstrength-reduce on netbsd, and I believe that the default
XFree86 compile flags for netbsd thus had -O2 -fno-strength-reduce, but
a compile of rwho on a 1.3.3 box (gcc version 2.7.2.2+myc2) with CFLAGS=-O2,
or CFLAGS="-O2 -fforce-mem -fstrength-reduce -fexpensive-optimizations" (to
force the issue) works fine.

Could someone with access and some knowledge of what is where check the
newer egcs/gcc branches/mainline to see if there's some sort of fix, or
at least a bug report, in place about this?  (I can't seem to find an easy
access to their bug reports, like our IMO quite useful bug query web pages.
And their cvsweb page just crashed my browser :(

jdarrow

-- 
John Darrow - Senior Technical Specialist               Office: 630/752-5201
Computing Services, Wheaton College, Wheaton, IL 60187  Fax:    630/752-5968
Alphapage: 6303160707%alphapage.airtouch.com@localhost            Pager:  
630/316-0707
Email:     John.P.Darrow%wheaton.edu@localhost



Home | Main Index | Thread Index | Old Index