Bug 13917 - Kernel doesn't work with gcc 2.95.1
Summary: Kernel doesn't work with gcc 2.95.1
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 3.3-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 1999-09-23 12:20 UTC by bero
Modified: 1999-09-23 21:00 UTC (History)
0 users

See Also:


Attachments
file.diff (344 bytes, patch)
1999-09-23 12:20 UTC, bero
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.