Hello, On Wed, Aug 30, 2017 at 05:55:00PM +0100, Ramsay Jones wrote: > On 30/08/17 17:14, Uwe Kleine-König wrote: > > ukleinek@plummer:~/sparse$ make check V=1 > > It would be easier to see the results if you _didn't_ add V=1. ;-) noted for the next time. > [snip] > > Out of 287 tests, 272 passed, 15 failed (10 of them are known to fail) > > Makefile:232: recipe for target 'check' failed > > make: *** [check] Error 1 > > ukleinek@plummer:~/sparse$ > > The additional five failures are all in the llvm backend (sparsec), > which you do not need to use sparse as a 'checker'. > > > The problem is that some cpp symbols are not defined in sparse that are > > expected to exist. So I can "fix" backend/sum.c with the following > > patch: > > > > diff --git a/validation/backend/sum.c b/validation/backend/sum.c > > index 0604299..d0be8dd 100644 > > --- a/validation/backend/sum.c > > +++ b/validation/backend/sum.c > > @@ -1,3 +1,5 @@ > > +#define __powerpc64__ > > +#define _CALL_ELF 2 > > #include > > #include > > > > > > Yep, sparse/sparsec do not define various macros that gcc/clang define > by default on a given architecture. This is a known problem (that I have > been meaning to fix ...). The 'workaround' for the time being is to use > the cgcc front-end to sparse. (for example 'make CC=cgcc', or perhaps > 'cgcc -no-compile'). > > [You didn't mention your usage - is this for a kernel build?] This problem became visible during the make check phase when creating packaged on the listed archs for horst[1]. You can see a build logs at https://buildd.debian.org/status/fetch.php?pkg=horst&arch=s390x&ver=5.0-1&stamp=1503905687&raw=0 https://buildd.debian.org/status/fetch.php?pkg=horst&arch=ppc64el&ver=5.0-1&stamp=1503906226&raw=0 The error message looks identical (I checked the ppc64el log) to the problem with backend/sum.c: sparse -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -std=gnu99 -Wall -Wextra -g -I. -DDO_DEBUG -I/usr/include/libnl3 *.[ch] /usr/include/powerpc64le-linux-gnu/gnu/stubs.h:8:12: error: unable to open 'gnu/stubs-32.h' Makefile:113: recipe for target 'check' failed make[1]: *** [check] Error 1 Best regards Uwe [1] https://packages.debian.org/sid/horst