Re: gcc4

From: Craig Rodrigues <rodrigc_at_crodrigues.org>
Date: Tue, 20 Dec 2005 12:19:11 -0500
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_at_crodrigues.org
Received on Tue Dec 20 2005 - 16:19:38 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:49 UTC