mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: "Robert P. J. Day" <rpjday@crashcourse.ca>
To: "U-Boot Version 2 (barebox)" <barebox@lists.infradead.org>
Subject: building for sandbox, warning: "__BIG_ENDIAN" is not defined
Date: Tue, 22 Dec 2009 15:56:55 -0500 (EST)	[thread overview]
Message-ID: <alpine.LFD.2.00.0912221552470.17516@localhost> (raw)


  perhaps showing my ignorance of how big vs little endian should be
implemented, but in configuring and building the sandbox version, i
get:

...
  CC      common/environment.o
In file included from common/environment.c:37:
include/envfs.h:47:23: warning: "__BIG_ENDIAN" is not defined
...

  this isn't surprising since, as i read it, because this is x86_64,
it's the little-endian headers that are included, but the envfs.h
header contains the preprocessor checking:

#ifndef __BYTE_ORDER
#error "No byte order defined in __BYTE_ORDER"
#endif

#if __BYTE_ORDER == __LITTLE_ENDIAN
... snip ...
#elif __BYTE_ORDER == __BIG_ENDIAN
... snip ...

  clearly(?), depending on which endianness is being used, one or the
other of __LITTLE_ENDIAN or __BIG_ENDIAN won't be defined, right?  so,
no matter what, *one* of those tests is going to generate a warning.

  am i reading that correctly?  is there a proper way to handle
endianness that doesn't generate a preprocessor warning?  thanks.

rday
--

========================================================================
Robert P. J. Day                               Waterloo, Ontario, CANADA

            Linux Consulting, Training and Kernel Pedantry.

Web page:                                          http://crashcourse.ca
Twitter:                                       http://twitter.com/rpjday
========================================================================

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

             reply	other threads:[~2009-12-22 20:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-22 20:56 Robert P. J. Day [this message]
2009-12-23  9:58 ` Sascha Hauer
2009-12-23 10:26   ` Robert P. J. Day
2009-12-23 10:50     ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LFD.2.00.0912221552470.17516@localhost \
    --to=rpjday@crashcourse.ca \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox