Re: [PATCH] m32r: set CHECKFLAGS properly

Kyle Moffett
2005-09-27T15:14:35Z

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.