qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1/4] add byteordered types to qemu.


From: Christoph Hellwig
Subject: Re: [Qemu-devel] [PATCH 1/4] add byteordered types to qemu.
Date: Thu, 2 Oct 2008 15:17:53 +0200
User-agent: Mutt/1.3.28i

On Thu, Oct 02, 2008 at 03:15:19PM +0200, Gerd Hoffmann wrote:
> > Actually __CHECKER__ is set by sparse.  __CHECK_ENDIAN__ is set on the
> > make command line when checking for endianess bugs.  For xfsprogs I
> > defined the bitwise annotations unconditionally because we made sure
> > to not have any of this warnings left (this was quite easy becaus a lot
> > of the code came from the kernel and was already properly annotated)
> 
> Thanks.  I still can't see the point of __CHECK_ENDIAN__ though, as
> -W(no-)bitwise should have the very same effect.  Historical reasons?

Me neither.  I guess it simply predates -Wbitwise.

> > Note that the biggest hurdle for xfsprogs was to convince libtool
> > that cgcc, the gcc wrapper for invoking sparse actually is a C compiler,
> > but that should be mood for qemu.
> 
> Nevertheless it must be winded up in configure and the build system.
> Shouldn't be hard though.  How fast is sparse?  Would it be sane to run
> it by default in case we find cgcc installed on the system?  Or should
> it better be opt-in?

cgcc is a drop-in wrapper that calls both gcc and sparse.  So you just
set your compiler to cgcc before configure or in the Makefile and then
both sparse and gcc get run.

sparse is extremly fast and barely noticeable compared to the speed
gcc takes to compile a file, but of course you have two fork exec
wait circles instead of one so some overhead is noticeable when
compiling lots of small files.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]