Message ID | 20170726084305.38537-1-luc.vanoostenryck@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 07/26/2017 01:43 AM, Luc Van Oostenryck wrote: > 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> Tested-by: Stephen Boyd <sboyd@codeaurora.org> Thanks.
On 07/26/2017 11:26 AM, Stephen Boyd wrote: > On 07/26/2017 01:43 AM, Luc Van Oostenryck wrote: >> 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> > Tested-by: Stephen Boyd <sboyd@codeaurora.org> > > Russell, is this good to put in the patch tracker? Luc, can you submit this via Russell's patch tracking system (see http://www.arm.linux.org.uk/developer/patches/info.php)?
On 08/07, Stephen Boyd wrote: > On 07/26/2017 11:26 AM, Stephen Boyd wrote: > > On 07/26/2017 01:43 AM, Luc Van Oostenryck wrote: > >> 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> > > Tested-by: Stephen Boyd <sboyd@codeaurora.org> > > > > > > Russell, is this good to put in the patch tracker? > > > Luc, can you submit this via Russell's patch tracking system (see > http://www.arm.linux.org.uk/developer/patches/info.php)? > It's been a while, and this isn't in linux-next or the patch tracker from what I can tell. I'll forward it along if nothing happens in the next couple days.
On Fri, Sep 29, 2017 at 8:37 PM, Stephen Boyd <sboyd@codeaurora.org> wrote: > On 08/07, Stephen Boyd wrote: >> On 07/26/2017 11:26 AM, Stephen Boyd wrote: >> > On 07/26/2017 01:43 AM, Luc Van Oostenryck wrote: >> >> 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> >> > Tested-by: Stephen Boyd <sboyd@codeaurora.org> >> > >> > >> >> Russell, is this good to put in the patch tracker? >> >> >> Luc, can you submit this via Russell's patch tracking system (see >> http://www.arm.linux.org.uk/developer/patches/info.php)? >> > > It's been a while, and this isn't in linux-next or the patch > tracker from what I can tell. I'll forward it along if nothing > happens in the next couple days. Sorry, I had forgot about it. It's now added as patch 8701/1 in Russell's system. -- Luc
diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 65f4e2a4e..121fd65f8 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -131,7 +131,7 @@ endif KBUILD_CFLAGS +=$(CFLAGS_ABI) $(CFLAGS_ISA) $(arch-y) $(tune-y) $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) -msoft-float -Uarm KBUILD_AFLAGS +=$(CFLAGS_ABI) $(AFLAGS_ISA) $(arch-y) $(tune-y) -include asm/unified.h -msoft-float -CHECKFLAGS += -D__arm__ +CHECKFLAGS += -D__arm__ -m32 #Default value head-y := arch/arm/kernel/head$(MMUEXT).o
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> --- arch/arm/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)