diff options
author | Daniel Axtens <dja@axtens.net> | 2016-07-12 10:54:51 +1000 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2016-07-14 20:44:03 +1000 |
commit | 62c2c5cf387beb4bbf45045c3041dc9cfb40e5df (patch) | |
tree | 1b0894875f1403c9a9b06cccc2d3a9223cfbe9d1 /arch | |
parent | f8750513b7001d5ae96313d4e19f782b56f1beb7 (diff) | |
download | blackbird-op-linux-62c2c5cf387beb4bbf45045c3041dc9cfb40e5df.tar.gz blackbird-op-linux-62c2c5cf387beb4bbf45045c3041dc9cfb40e5df.zip |
powerpc/sparse: Pass endianness to sparse
Explicitly give sparse an endianness in the Makefile, so that it
doesn't get confused.
Normally we have #ifdef one and #else the other, so it doesn't usually
matter, but we have been bitten by it before, and indeed this patch
fixes a number of sparse errors.
Suggested-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Daniel Axtens <dja@axtens.net>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/Makefile | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile index b41f4c600a65..ca254546cd05 100644 --- a/arch/powerpc/Makefile +++ b/arch/powerpc/Makefile @@ -181,6 +181,11 @@ KBUILD_CFLAGS += -pipe -Iarch/$(ARCH) $(CFLAGS-y) CPP = $(CC) -E $(KBUILD_CFLAGS) CHECKFLAGS += -m$(CONFIG_WORD_SIZE) -D__powerpc__ -D__powerpc$(CONFIG_WORD_SIZE)__ +ifdef CONFIG_CPU_BIG_ENDIAN +CHECKFLAGS += -D__BIG_ENDIAN__ +else +CHECKFLAGS += -D__LITTLE_ENDIAN__ +endif KBUILD_LDFLAGS_MODULE += arch/powerpc/lib/crtsavres.o |