]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
s390: pass endianness info to sparse
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>
Tue, 31 Oct 2017 17:22:08 +0000 (18:22 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Thu, 2 Nov 2017 06:52:25 +0000 (07:52 +0100)
s390 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.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/Makefile

index dac821cfcd430310a95624754d7dd814bcd7705b..64c2fe9dcfbe3595261190b6edc7f9ce508f55a9 100644 (file)
@@ -21,7 +21,7 @@ KBUILD_CFLAGS += -m64
 KBUILD_AFLAGS  += -m64
 UTS_MACHINE    := s390x
 STACK_SIZE     := 16384
-CHECKFLAGS     += -D__s390__ -D__s390x__
+CHECKFLAGS     += -D__s390__ -D__s390x__ -mbig-endian
 
 export LD_BFD