On 03/02/2019 11:40, Luc Van Oostenryck wrote: > Predefined macros like '__x86_64__', '__arm__', ... are used > in systems headers (and surely at other places too). > > So, add them for all archs known to sparse (and remove > the corresponding parts in cgcc, they are now redundant). > > Note: these are only tested on i386, x86-64, arm, arm64, > mips64 (ABI O32), ppc, ppc64 (power7), ppc64el (power8) > and sparc64, most of then on a not-so-new OS version. > > Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx> > --- > > Change since v1: > -) add __PPC__, __PPC64__, __sparsev9__, __sparc64__ & __s390__ > which were defined in cgcc but not sparse itself. > -) remove redundant defs in cgcc Hmm, this isn't quite what I had in mind! ;-) I had meant to mention this some time ago when previous changes also "removed redundant defs" from the 'specs' in cgcc. It is possible to specify the '-target=<spec>' to use on the cgcc command-line, presumably to allow some 'cross-compilation' ability. How effective this would be I don't really know. I have never used this facility, but it was presumably added for a reason. (Actually, the commits that add the 'specs' don't provide any motivation in their commit messages! see eg. commits 14db8c95, and cf2bde63). So, this may be going in the wrong direction. ATB, Ramsay Jones