[ovs-dev] [PATCH] sparse: Support recent distributions

Ben Pfaff blp at nicira.com
Mon Apr 15 20:00:30 UTC 2013


On Fri, Apr 05, 2013 at 04:56:52PM -0700, Andy Zhou wrote:
> sparse support seems to be broken on some recent Linux distributions.
> For example, ubuntu 12.04 with Linux 3.5 kernel, and Debian latest test
> distribution, running Linux 3.2 kernel.
> 
> On both systems that sparse was broken, It was not able find the header files
> in the  default system include directories.  GCC finds them by default.
> 
> This patch adds the required GCC default search path when running sparse.
> 
> Tested on:
> 
> Ubuntu 12.04 - w/ linux 3.5 kernel
> Debian-6 March test distribution - w/ linux 3.2 kernel
> 
> Signed-off-by: Andy Zhou <azhou at nicira.com>

This approach doesn't make me happy, but after some poking around I
can't figure out a better way.

One issue to consider: as-is, this adds an extra gcc and sed
invocation for every compile (inside ``).  That might extend the
overall "make" by a second or more.  Would you mind measuring the
cost?  If it is high, then it would be worth doing the gcc and sed
invocation just once, at configure time, and then using the results
for every "make'.

Thanks,

Ben.



More information about the dev mailing list