From: H. Peter Anvin Date: Fri, 30 Sep 2005 19:19:02 GMT Subject: Re: [PATCH] Support SPARSE in Makefile, better SPARSE_FLAGS Message-ID: <433D8FA6.2080808@zytor.com> In-Reply-To: <1128087662.14543.14.camel@dv> Pavel Roskin wrote: > > I hate to say that, but a better alternative is to fix sparse to act > like the native compiler by default (possibly with options to imitate > other architectures or to be fully arch-neutral). > $(CC) $(CFLAGS) -E -dM -x c /dev/null -o builtin.h ... will output a file containing all the buildin macros that you can feed to sparse with -include. Replacing -x c with, say, -x c++ gives you the builtins for C++; including $(CFLAGS) gives the appropriate set of macros for any particular combination of options (which can affect the builtin macro set.) -hpa