Re: [PATCH] m32r: set CHECKFLAGS properly

From: Kyle Moffett
Date: Tue Sep 27 2005 - 10:15:49 EST


On Sep 27, 2005, at 03:10:25, Al Viro wrote:
You do realize that this way sparse will get neither? It does not pick predefined symbols from gcc; thus the -D<your_arch>, etc.

How about sticking this in some global Makefile somewhere? This will give sparse the same list of defines that GCC uses:

CHECKFLAGS += $(shell echo | gcc -E - -dM | sed -re 's/^#define +([^ ] +) +(.*)$/-D\1=\2/g')

Or you could do this:

include/linux/checkerdefines.h:
echo | gcc -E - -dM >$@

And in linux/stddef.h or linux/compiler.h or something do:
#if defined(__CHECKER__) and not defined(_LINUX_CHECKERDEFINES_H)
# define _LINUX_CHECKERDEFINES_H 1
# include <linux/checkerdefines.h>
#endif

Cheers,
Kyle Moffett

--
Q: Why do programmers confuse Halloween and Christmas?
A: Because OCT 31 == DEC 25.



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/