On Wed, Sep 6, 2017 at 10:44 AM, Uwe Kleine-König <uwe@xxxxxxxxxxxxxxxxx> wrote: > > and while it's ok to test the core stuff and not wanting the system > includes to interfere, there should also be tests that check "ordinary" > userspace programs which naturally depend on the system headers. > There is one. The "selfcheck" target was checking sparse on its own source file. That will definitively use the system header file. However, there are some warning trigger in the system header file can't be fixed in the sparse source code. It need to change the system header to make some warning go away, or disable that warning. > > No, it's not solved. But given that it is somehow known that sparse > (without cgcc) fails to work well on userspace stuff, I think the > following would be fine for the Debian side: > > a) let horst use cgcc instead of sparse > b) downgrade bug to important or even normal pointing out that cgcc > should be used for userspace programs That seems to be the right thing to do for now. That is until sparse are smarter on user space header regarding architecture stuff. > For sparse it would be cool to: > > c) drop the #weak_define of __amd64__ to make this "problem" more > apparent. (Assuming this doesn't break e.g. a kernel build.) You mean remove define of "__x86_64__". It will likely break some other stuff. For the record the "selfcheck" target already using cgcc. We still need to fix the breakage. Any suggestion how to test sparse running on other platform headfile without have to get access to ppc64 for example? I think that is the biggest obstacle right now. I can make some changes, but I don't have a good way to test it other than x86 platform. > d) fix the test suite, at least mark the tests that are expected to > fail on !x86 as such to make $(make check) succeed. (Otherwise I'd > have to disable or ignore the testsuite which isn't that great.) We can make the test-suite not depend on system header files. That seems to be the right think to do. I also send out a patch to let the llvm back end test-suite use cgcc last week. Removing system header usage in test suite is better. Chris -- To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html