Date: Fri, 21 Jul 2000 20:04:20 +1000 (EST) From: Bruce Evans <bde@zeta.org.au> To: John Polstra <jdp@polstra.com> Cc: hm@hcs.de, current@FreeBSD.ORG Subject: Re: kernel compile failure without -O option Message-ID: <Pine.BSF.4.21.0007211950150.2374-100000@besplex.bde.org> In-Reply-To: <200007200231.TAA15177@vashon.polstra.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 19 Jul 2000, John Polstra wrote: > In article <20000719144614.7FE52483D@hcswork.hcs.de>, > Hellmuth Michaelis <hm@hcs.de> wrote: > > > > In the process of tracing down the problem of the kernel panic when booting > > a kernel with pcvt enabled, i tried to compile a kernel without the -O > > option to gcc and got this compile failure (sources from 18.7.2000 9:00 MET): > > > > cc -c -pipe -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes > > -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual > > -fformat-extensions -ansi -nostdinc -I- -I. -I../.. -I../../../include > > -D_KERNEL -include opt_global.h -elf -mpreferred-stack-boundary=2 > > -fomit-frame-pointer ../../i386/i386/atomic.c > > In file included from ../../i386/i386/atomic.c:47: > > machine/atomic.h: In function `atomic_set_char': > > machine/atomic.h:106: inconsistent operand constraints in an `asm' > > machine/atomic.h: In function `atomic_clear_char': > > machine/atomic.h:107: inconsistent operand constraints in an `asm' > [...] > > I have seen that same problem recently in a slightly different > context. After staring at the code for a very long time, I could > only conclude that the problem was a bug in gcc. Me too :-). I didn't reply to John's private mail about this (sorry), partly because the problem seemed to be an old one that I wasn't able to solve before. The "0" construct apparently doesn't work even with -O for gcc <= 2.8, so atomic.h is ifdefed to not use it for non-current gcc's, although it is strictly required for the input-output operands in atomic.h. There is also a problem with gcc's handling of volatile objects in atomic.h (it just pessimizes them). Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0007211950150.2374-100000>