All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] openrisc: pass endianness info to sparse
       [not found]   ` <CAMHZB6E+_EvR_C_JC5G7FZ1qUTJq-c3Y+jk7JLJ6wekzzgauFw@mail.gmail.com>
@ 2017-11-01 12:20     ` Stafford Horne
  0 siblings, 0 replies; only message in thread
From: Stafford Horne @ 2017-11-01 12:20 UTC (permalink / raw)
  To: Luc Van Oostenryck; +Cc: LKML

+CC List

On Wed, Nov 01, 2017 at 05:34:29AM +0100, Luc Van Oostenryck wrote:
> On Wed, Nov 1, 2017 at 3:00 AM, Stafford Horne <shorne@gmail.com> wrote:
> > On Tue, Oct 31, 2017 at 06:22:05PM +0100, Luc Van Oostenryck wrote:
> >> openrisc 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.
> >
> > Thank You,
> >
> > I have applied this.  I haven't really used sparse before, but it looks great.
> 
> Just use 'make C=1' or 'make C=2' when compiling the kernel.
> For endianness problems, sparse is invaluable as it does things no
> others tools can.

Right, I tried it out and it works well.  Now I have a new tool to add to my
workflow, and it looks like a few bugs to fix as well.

> > Do you think openrisc needs to set other arguments like __BIG_ENDIAN__ as other
> > architectures do?
> 
> If you use a recent version of sparse (the version 0.5.1 released in August),
> which I strongly advise, you don't need to as sparse then understand
> -mbig-endian
> and then define __BIG_ENDIAN__ internally, like GCC do.
> But with older version of sparse, yes, it would also be needed as well
> as __BYTE_ORDER__.

I do have 0.5.1 so I should be good.

-Stafford

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-11-01 12:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20171031172205.9892-1-luc.vanoostenryck@gmail.com>
     [not found] ` <20171101020047.GE29237@lianli.shorne-pla.net>
     [not found]   ` <CAMHZB6E+_EvR_C_JC5G7FZ1qUTJq-c3Y+jk7JLJ6wekzzgauFw@mail.gmail.com>
2017-11-01 12:20     ` [PATCH] openrisc: pass endianness info to sparse Stafford Horne

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.