[PATCH] sparc: pass endianness info to sparse

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



sparc 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: David S. Miller <davem@xxxxxxxxxxxxx>
CC: sparclinux@xxxxxxxxxxxxxxx
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx>
---
 arch/sparc/Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/sparc/Makefile b/arch/sparc/Makefile
index 8496a074b..ef1598f5a 100644
--- a/arch/sparc/Makefile
+++ b/arch/sparc/Makefile
@@ -55,6 +55,8 @@ endif
 
 endif
 
+CHECKFLAGS     += -mbig-endian
+
 head-y                 := arch/sparc/kernel/head_$(BITS).o
 
 # See arch/sparc/Kbuild for the core part of the kernel
-- 
2.14.0

--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Development]     [DCCP]     [Linux ARM Development]     [Linux]     [Photo]     [Yosemite Help]     [Linux ARM Kernel]     [Linux SCSI]     [Linux x86_64]     [Linux Hams]

  Powered by Linux