Skip to contentSkip to conversation

s390: pass endianness info to sparse

PATCH New Luc Van Oostenryck 1 participant 1 message Oct 31, 2017 s390

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 s390: pass endianness info to sparse

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.

To: Martin Schwidefsky <[email protected]> (supporter:S390)
To: Heiko Carstens <[email protected]> (supporter:S390)

---
 arch/s390/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/s390/Makefile +1 -1
index dac821cfc..64c2fe9dc 100644
@@ -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
 
Signature · 1 line
2.14.0