Bug 13917

Summary: Kernel doesn't work with gcc 2.95.1
Product: Base System Reporter: bero <bero>
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 3.3-RELEASE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description bero 1999-09-23 12:20:01 UTC
Just tried building the kernel with gcc 2.95.1 for performance reasons
(-mcpu=k6 -march=k6...).
First of all, it doesn't compile because of a broken asm() construct in
i386/include/bus.h, line 575: The esi and ecx are listed as clobbered despite
being used for return values [and therefore being clobbered implicitly].
[Patch in Fix:]

Also, I had to remove the -fformat-extensions CFLAG from bsd.kern.mk because
it's obsolete.

After fixing this, the kernel compiles; but trying to boot it immediately
reboots the machine.
The last line output by the kernel before rebooting is

real memory  = 83886080 (81920K bytes)

Is there a known fix for compiling with gcc 2.95.1 yet? Any ideas where to
start debugging the problem?

How-To-Repeat: 
Attempt to compile the kernel with gcc 2.95.1; used CFLAGS:
-O2 -fno-strict-aliasing -mcpu=k6 -march=k6 -pipe -fno-exceptions
Comment 1 cpiazza freebsd_committer freebsd_triage 1999-09-23 20:59:07 UTC
State Changed
From-To: open->closed

Compiling the kernel with gcc 2.95.1 is not a supported configuration 
on -stable or -current at this time.  Feel free to make any local changes, 
of course.