public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Joshua Kinard <kumba@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] Profile-enforced big-endian USE flag
Date: Thu, 29 Jun 2017 06:30:16 -0400	[thread overview]
Message-ID: <521e5c98-7412-3069-2940-577b6d653b29@gentoo.org> (raw)
In-Reply-To: <20170628232903.0230bc8e@symphony.aura-online.co.uk>

On 06/28/2017 18:29, James Le Cuirot wrote:
> On Wed, 28 Jun 2017 17:52:26 -0400
> Mike Gilbert <floppym@gentoo.org> wrote:
> 
>> On Tue, Jun 27, 2017 at 6:44 PM, James Le Cuirot <chewi@gentoo.org> wrote:
>>> I am therefore proposing a new global big-endian flag. This could be
>>> masked by default and unmasked + forced in the relevant profiles under
>>> arch. I will apply this according to the mapping defined in tc-endian of
>>> toolchain-funcs.eclass.  
> 
> I've just been putting the patch together. I made it slightly simpler
> by masking *and* forcing it by default so that it only needs to be
> unmasked were necessary.
> 
>> A possible alternative would be to create a new USE_EXPAND variable
>> for this. That would allow for easier expansion in case we ever
>> support something other than big/little endian machines.
> 
> That way madness lies? Wikipedia talks about middle-endian as being the
> catch all for other random orderings that have appeared over the years
> but I don't think any of them were used on a system-wide basis. I can't
> imagine Linux ever supporting such a thing. Unless you're talking about
> dealing with soft vs hard float here too?

As far as I know, Linux only supports big-endian and little-endian systems,
along with supporting a fairly-wide variety of platforms and architectures,
beaten really only by NetBSD.  If NetBSD lacks anything for middle-endian, then
it's probably safe to ignore it.

That said, Wikipedia doesn't offer much on the nature of middle-endian (which
is called "PDP-endian"), except to state that "The ARM architecture can also
produce this format when writing a 32-bit word to an address 2 bytes from a
32-bit word alignment."
https://en.wikipedia.org/wiki/Endianness#Middle

And this resource:
http://unixpapa.com/incnote/byteorder.html

Recommends to ignore middle-endian, as it believes no processor was ever
implemented that stored integers in middle-endian format.

-- 
Joshua Kinard
Gentoo/MIPS
kumba@gentoo.org
6144R/F5C6C943 2015-04-27
177C 1972 1FB8 F254 BAD0 3E72 5C63 F4E3 F5C6 C943

"The past tempts us, the present confuses us, the future frightens us.  And our
lives slip away, moment by moment, lost in that vast, terrible in-between."

--Emperor Turhan, Centauri Republic


  parent reply	other threads:[~2017-06-29 10:30 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-27 22:44 [gentoo-dev] Profile-enforced big-endian USE flag James Le Cuirot
2017-06-28 21:52 ` Mike Gilbert
2017-06-28 22:29   ` James Le Cuirot
2017-06-28 23:20     ` Gordon Pettey
2017-06-29  2:49     ` Mike Gilbert
2017-06-29 10:30     ` Joshua Kinard [this message]
2017-06-29 21:19     ` [gentoo-dev] [PATCH] " James Le Cuirot
2017-06-29 21:37       ` Matt Turner
2017-06-29 21:52         ` James Le Cuirot
2017-07-01  8:04           ` Tobias Klausmann
2017-07-01  9:03       ` James Le Cuirot

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=521e5c98-7412-3069-2940-577b6d653b29@gentoo.org \
    --to=kumba@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.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