Skip to content

Commit 6042b8c

Browse files
lucvooRussell King
authored andcommitted
ARM: 8701/1: fix sparse flags for build on 64bit machines
By default sparse uses the characteristics of the build machine to infer things like the wordsize. This is fine when doing native builds but for ARM it's, I suspect, very rarely the case and if the build are done on a 64bit machine we get a bunch of warnings like: 'cast truncates bits from constant value (... becomes ...)' Fix this by adding the -m32 flags for sparse. Reported-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
1 parent 195320f commit 6042b8c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

arch/arm/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ endif
131131
KBUILD_CFLAGS +=$(CFLAGS_ABI) $(CFLAGS_ISA) $(arch-y) $(tune-y) $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) -msoft-float -Uarm
132132
KBUILD_AFLAGS +=$(CFLAGS_ABI) $(AFLAGS_ISA) $(arch-y) $(tune-y) -include asm/unified.h -msoft-float
133133

134-
CHECKFLAGS += -D__arm__
134+
CHECKFLAGS += -D__arm__ -m32
135135

136136
#Default value
137137
head-y := arch/arm/kernel/head$(MMUEXT).o

0 commit comments

Comments
 (0)