From owner-freebsd-current@FreeBSD.ORG Tue Dec 20 17:19:38 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 627CC16A41F for ; Tue, 20 Dec 2005 17:19:38 +0000 (GMT) (envelope-from rodrigc@crodrigues.org) Received: from sccrmhc11.comcast.net (sccrmhc11.comcast.net [204.127.202.55]) by mx1.FreeBSD.org (Postfix) with ESMTP id AD28843D81 for ; Tue, 20 Dec 2005 17:19:18 +0000 (GMT) (envelope-from rodrigc@crodrigues.org) Received: from c-24-63-58-245.hsd1.ma.comcast.net (c-24-147-19-128.hsd1.ma.comcast.net[24.147.19.128](misconfigured sender)) by comcast.net (sccrmhc11) with ESMTP id <20051220171912011005dudde>; Tue, 20 Dec 2005 17:19:13 +0000 Received: from c-24-147-19-128.hsd1.ma.comcast.net (localhost [127.0.0.1]) by c-24-63-58-245.hsd1.ma.comcast.net (8.13.4/8.13.1) with ESMTP id jBKHJC9W045733; Tue, 20 Dec 2005 12:19:12 -0500 (EST) (envelope-from rodrigc@c-24-147-19-128.hsd1.ma.comcast.net) Received: (from rodrigc@localhost) by c-24-147-19-128.hsd1.ma.comcast.net (8.13.4/8.13.1/Submit) id jBKHJBva045732; Tue, 20 Dec 2005 12:19:11 -0500 (EST) (envelope-from rodrigc) Date: Tue, 20 Dec 2005 12:19:11 -0500 From: Craig Rodrigues To: delphij@delphij.net Message-ID: <20051220171911.GA32051@crodrigues.org> References: <43A7BF25.6040901@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i Cc: freebsd-current@FreeBSD.org Subject: Re: gcc4 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Dec 2005 17:19:38 -0000 On Tue, Dec 20, 2005 at 05:28:48PM +0800, Xin LI wrote: > Is our tree gcc4-safe already? I have not checked for this for a long time... Not really. The kernel mostly compiles with gcc40 from ports (I used gcc 4.0.2) if you compile with these flags set: WERROR= NO_WERROR=1 CC=/usr/local/bin/gcc40 and if you apply this patch: http://people.freebsd.org/~rodrigc/gcc40_makefiles_diff.txt You get lots of compilation warnings, mostly about comparing signed/unsigned pointers, such as the ones here: http://people.freebsd.org/~rodrigc/gcc40_warnings.txt There is at least one compilation error: In file included from /usr/src/sys/kern/sched_4bsd.c:56: ./machine/smp.h:36: error: array type has incomplete element type cc1: warnings being treated as errors In file included from /usr/src/sys/kern/subr_smp.c:50: ./machine/smp.h:36: error: array type has incomplete element type In file included from /usr/src/sys/i386/i386/local_apic.c:59: ./machine/smp.h:36: error: array type has incomplete element type In file included from /usr/src/sys/i386/i386/mp_watchdog.c:46: ./machine/smp.h:36: error: array type has incomplete element type The line causing the problem I think is this one in smp.h: extern struct pcb stoppcbs[]; I think the way things are inclu I did not try a buildworld with gcc4.0. -- Craig Rodrigues rodrigc@crodrigues.org