Subject: bin/13108: egcs-2.91.66 march=i686 is broken
To: None <gnats-bugs@gnats.netbsd.org>
From: None <prlw1@cam.ac.uk>
List: netbsd-bugs
Date: 06/04/2001 17:25:02
>Number:         13108
>Category:       bin
>Synopsis:       egcs-2.91.66 march=i686 is broken
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jun 04 09:24:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Patrick Welche
>Release:        May 28 2001 17:09 GMT
>Organization:
>Environment:
System: NetBSD-1.5V/i386
>Description:
egcs-2.91.66 built with -march=i686 generates broken code.
>How-To-Repeat:
On a working i386 make a release from May 27 2001 12:22 GMT source code.
Move to computer with

  cpu0: Intel Pentium III (Coppermine) (686-class), 496.33 MHz
  cpu0: I-cache 16 KB 32b/line 4-way, D-cache 16 KB 32b/line 2-way
  cpu0: L2 cache 256 KB 32b/line 8-way
  cpu0: features 383f9ff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR>
  cpu0: features 383f9ff<PGE,MCA,CMOV,FGPAT,PSE36,MMX,FXSR,XMM>

and install release.
Grab source tree of May 28 2001 17:09 GMT
Build GENERIC kernel & boot - kernel works.
Build GENERIC kernel with COPTS+=-march=i686 & boot - kernel works.
make build
Build GENERIC kernel & boot - kernel works.
Build GENERIC kernel with COPTS+=-march=i686 & boot - kernel works. [1]
add COPTS+=-march=i686 to /etc/mk.conf, and make build
Build GENERIC kernel WITHOUT -march=i686     & boot - kernel is broken.
Build GENERIC kernel with COPTS+=-march=i686 & boot - kernel is broken.

By broken kernel I mean you see the numbers in square brackets and then it
immediately reboots without a single kernel message appearing.

[1] just side note: sound seemed garbled with this one - didn't make
    observation for other cases.


Related note from Jim Bernard <jbernard@mines.edu> on tech-toolchain:

  I saw that same thing on a pentium pro--see discussion
"kernel won't start on i386" May 11--12 on current-users.  (I never got
around to reporting back that I had conclusively determined that it was
the compiler compiled with -march=pentiumpro that caused the breakage,
though that was what I speculated in my last message in the thread.)
Compiling the system with -march=pentium is OK, though, which is good
enough for me for now (hopefully the upcoming toolchain upgrade will
fix the problem).


And possibly related PR: port-i386/6967 gcc -march=i486 generates bad assembler
>Fix:
As Todd Vierling announced on 1 June that "In particular, i386 will also
switch to the new gcc and binutils this weekend." The above now seems
irrelevant (hence Priority: low...) - though maybe the flag should be
disabled in whatever release (1.5.1?) is going? Better to generate slow
working code...
>Release-Note:
>Audit-Trail:
>Unformatted: