On Fri, Sep 01, 2017 at 12:02:12AM -0700, Josh Triplett wrote: > On Thu, Aug 31, 2017 at 08:47:55PM -0400, Christopher Li wrote: > > On Thu, Aug 31, 2017 at 4:55 PM, Uwe Kleine-König <uwe@kleine-> Yes > > that works. So to address the Debian bug I can do: > > > > > > - move sparse to /usr/lib > > > - teach cgcc about the move of sparse > > > - make /usr/bin/sparse call cgcc -no-compile "$@" > > > > I don't like that. It means the user can't invoke sparse directly. > > > > > > > > or is it easier to teach sparse about the architecture stuff? > > > > First of all. It is not very trivial to teach sparse about the architecture > > stuff. To my mind, we need to move all the cgcc logic into sparse. > > Related to that: while it would mean we couldn't necessarily just rely > entirely on GCC's definitions for a target platform, I think in an ideal > world we could have a sparse binary that understood *all* target > platforms at once, such that you could ask Sparse on x86_64 to "compile" > as though targeting any arbitrary architecture. That would also have the > major advantage of making it easy to run the Sparse testsuite for > *every* target architecture without needing compilers for every such > architecture. You'd need the target arch's system headers though. But still it would be great. In a first attempt something like: #ifdef __powerpc__ add_pre_buffer("#weak_define __powerpc__ " __powerpc__ "\n"); #ifdef _CALL_ELF add_pre_buffer("#weak_define _CALL_ELF " _CALL_ELF "\n"); #endif #endif would be helpful already. Best regards Uwe
Attachment:
signature.asc
Description: PGP signature