teach sparse about -m{big,little}-endian
commit398907b40bc91b35910a1657d729c2c2d4de0f57
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>
Tue, 20 Jun 2017 16:58:49 +0000 (20 18:58 +0200)
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>
Wed, 21 Jun 2017 09:28:40 +0000 (21 11:28 +0200)
treea356e8b368f83202e997df4b6589fe65fef39ff5
parentcd33f157c25d0abbcb68896ae35e23b76d20cbd3
teach sparse about -m{big,little}-endian

Some macros, structures definitions, ... are endianness specific.
This is generaly done with the help of some header files but these
headers often need information from the compiler which then need
to be endian-aware.

In order to not interpret things differently than the compiler
would, sparse thus also need to be endian-aware, even more so
given that sparse must cover all archs and their variants.

Give this information to sparse with two flags:
-mbig-endian/-mlittle-endian, and by default use
the endianness of the platform used to compile sparse.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Acked-by: Christopher Li <sparse@chrisli.org>
lib.c
lib.h