Return to BSD News archive
Path: sserve!manuel!munnari.oz.au!spool.mu.edu!uunet!mcsun!Germany.EU.net!lemis!grog From: grog@lemis.uucp (Greg Lehey) Newsgroups: comp.unix.bsd Subject: Re: gcc 2.2.2 - work for kernel compiles? Keywords: kernel gcc Message-ID: <2386@adagio.lemis.uucp> Date: 19 Sep 92 12:04:31 GMT References: <78r4028n22ZR01@JUTS.ccc.amdahl.com> Organization: LEMIS, W-6324 Feldatal, Germany Lines: 39 In article <78r4028n22ZR01@JUTS.ccc.amdahl.com> gab10@cd.amdahl.com (Gary A Browning) writes: >A while back there was a thread about compiling gcc-2.2.2. The last I heard, >there was problems trying to compile the kernel with it. Anybody know what >the current status is? I don't use 386BSD, but I believe the problems are probably the same as in BSD/386: Jon Block recently recompiled that kernel with gcc 2.2.2. Here's his last message: > From: unido!gmf.eds.com!block (W. Jon Block) > Subject: Kernel Build w/GCC-2.2.2 (SUCCESS!!) > Date: Thu, 17 Sep 92 7:11:00 EDT > > I finally had some time to look into the problems with using > gcc-2.2.2 to compile the kernel (actually only machdep.c). The > problem is the way that bitfields are aligned. Because the sd_lobase > field of the struct segment_descriptor (segments.h) is 24 bits, it > is aligned at the next longword boundary, instead of packing half > in the current, half in the next as in gcc-1.40. This causes problems > when calling lgdt in locore. > > After making some changes, I was able to completely rebuild my > kernel using gcc-2.2.2. I am still looking at was is the best way > to resolve this, and will post more info as it is available. Other problems to look out for: - use -fnobuiltin when compiling - a lot of warnings get generated for the args structure of system calls. So far I haven't found a way to fix this. - A number of the i386/isa files won't compile with the -traditional option - they do fine without. - i386/isa/npx.s dies with asm commands referring to constraint "=g" (just about any address, but not non-general registers). Changing this to "=m" allows it to compile. -- Greg Lehey | Tel: +49-6637-1488 LEMIS | Fax: +49-6637-1489 Schellnhausen 2, W-6324 Feldatal, Germany