Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Sep 1999 13:10:48 +0200 (CEST)
From:      bero@ms-windows-2000.com
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   kern/13917: 3.3-RELEASE kernel / gcc 2.95.1
Message-ID:  <199909231110.NAA01322@data.freefilm.za.org>

next in thread | raw e-mail | index | archive | help

>Number:         13917
>Category:       kern
>Synopsis:       Kernel doesn't work with gcc 2.95.1
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Sep 23 04:20:01 PDT 1999
>Closed-Date:
>Last-Modified:
>Originator:     Bernhard Rosenkraenzer
>Release:        FreeBSD 3.3-RELEASE i386
>Organization:
MandrakeSoft
>Environment:

FreeBSD 3.3-RELEASE, ix86, gcc 2.95.1

>Description:

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

>Fix:
	
--- sys/i386/include/bus.h.broken	Sun Aug 29 18:06:21 1999
+++ sys/i386/include/bus.h	Thu Sep 23 12:13:13 1999
@@ -571,8 +571,7 @@
 			movb %%al,(%1)				\n\
 			loop 1b"				:
 		    "=&a" (__x)					:
-		    "r" (bsh + offset), "S" (addr), "c" (count)	:
-		    "%esi", "%ecx");
+		    "r" (bsh + offset), "S" (addr), "c" (count));
 	}
 #endif
 }


>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199909231110.NAA01322>