Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

openrisc: pass endianness info to sparse

openrisc is big-endian only but sparse assumes the same endianness
as the building machine.
This is problematic for code which expect __BYTE_ORDER__ being
correctly predefined by the compiler which sparse can then
pre-process differently from what gcc would, depending on the
building machine endianness.

Fix this by letting sparse know about the architecture endianness.

To: Jonas Bonn <jonas@southpole.se>
To: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
To: Stafford Horne <shorne@gmail.com>
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Signed-off-by: Stafford Horne <shorne@gmail.com>

authored by

Luc Van Oostenryck and committed by
Stafford Horne
afa83808 4553474d

+1
+1
arch/openrisc/Makefile
··· 25 25 LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) 26 26 27 27 KBUILD_CFLAGS += -pipe -ffixed-r10 -D__linux__ 28 + CHECKFLAGS += -mbig-endian 28 29 29 30 ifeq ($(CONFIG_OPENRISC_HAVE_INST_MUL),y) 30 31 KBUILD_CFLAGS += $(call cc-option,-mhard-mul)