public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/52187] New: armeb-unknown-eabi not recognized as big-endian
@ 2012-02-09 17:53 egnor at ofb dot net
  2012-02-09 18:04 ` [Bug target/52187] " pinskia at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: egnor at ofb dot net @ 2012-02-09 17:53 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52187

             Bug #: 52187
           Summary: armeb-unknown-eabi not recognized as big-endian
    Classification: Unclassified
           Product: gcc
           Version: 4.6.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: egnor@ofb.net


In gcc/config.gcc, the stanza for Linux recognizes arm*b-* and treats it as
big-endian:

arm*-*-linux*)                  # ARM GNU/Linux with ELF
        tm_file="dbxelf.h elfos.h gnu-user.h linux.h linux-android.h
glibc-stdint.h arm/elf.h arm/linux-gas.h arm/linux-elf.h"
        case $target in
        arm*b-*)
                tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
                ;;
        esac

However, the similar stanza for other arm targets does not.  In my case I am
using armeb-unknown-eabi (for a bare metal project), which means the
arm*-*-eabi* stanza takes place.  This ignores the "eb" suffix and builds a
compiler which defaults to little endian.  (Worse, libgcc is built in
little-endian mode, causing subtle bugs even with code compiled with
-mbig-endian.)

Copying the Linux arm*b-* section to the other stanza helps my case, but I'm
not sure it's a general solution.

Bug 16350 may be related -- possibly even a dupe -- though I'm not sure the
scope is the same.  Good code _is_ generated with -mbig-endian, it just needs
to be recognized as the default for appropriate targets.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug target/52187] armeb-unknown-eabi not recognized as big-endian
  2012-02-09 17:53 [Bug other/52187] New: armeb-unknown-eabi not recognized as big-endian egnor at ofb dot net
@ 2012-02-09 18:04 ` pinskia at gcc dot gnu.org
  2012-02-09 18:06 ` egnor at ofb dot net
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-02-09 18:04 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52187

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|other                       |target

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-02-09 18:04:09 UTC ---
I think this is really a dup of bug 49448 or at least related to it.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug target/52187] armeb-unknown-eabi not recognized as big-endian
  2012-02-09 17:53 [Bug other/52187] New: armeb-unknown-eabi not recognized as big-endian egnor at ofb dot net
  2012-02-09 18:04 ` [Bug target/52187] " pinskia at gcc dot gnu.org
@ 2012-02-09 18:06 ` egnor at ofb dot net
  2012-02-10 19:01 ` rearnsha at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: egnor at ofb dot net @ 2012-02-09 18:06 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52187

--- Comment #2 from Dan Egnor <egnor at ofb dot net> 2012-02-09 18:06:36 UTC ---
This is sort of the opposite of 49448.

In 49448, the _Linux_ rule is recognizing a _little endian_ target as _big
endian_ because its big-endian glob is too generous.

In this bug, a _non-Linux_ rule is recognizing a _big endian_ target as _little
endian_, because there's no big-endian glob at all.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug target/52187] armeb-unknown-eabi not recognized as big-endian
  2012-02-09 17:53 [Bug other/52187] New: armeb-unknown-eabi not recognized as big-endian egnor at ofb dot net
  2012-02-09 18:04 ` [Bug target/52187] " pinskia at gcc dot gnu.org
  2012-02-09 18:06 ` egnor at ofb dot net
@ 2012-02-10 19:01 ` rearnsha at gcc dot gnu.org
  2012-02-23  2:36 ` ramana at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rearnsha at gcc dot gnu.org @ 2012-02-10 19:01 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52187

Richard Earnshaw <rearnsha at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|                            |arm
           Priority|P3                          |P5
           Severity|normal                      |enhancement

--- Comment #3 from Richard Earnshaw <rearnsha at gcc dot gnu.org> 2012-02-10 19:01:41 UTC ---
Not as important as linux because you can always enable the big-endian
multilibs.  Autodetection of the native target doesn't apply to cross building.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug target/52187] armeb-unknown-eabi not recognized as big-endian
  2012-02-09 17:53 [Bug other/52187] New: armeb-unknown-eabi not recognized as big-endian egnor at ofb dot net
                   ` (2 preceding siblings ...)
  2012-02-10 19:01 ` rearnsha at gcc dot gnu.org
@ 2012-02-23  2:36 ` ramana at gcc dot gnu.org
  2013-02-15 18:35 ` sethml at google dot com
  2013-03-20  0:44 ` pinskia at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: ramana at gcc dot gnu.org @ 2012-02-23  2:36 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52187

Ramana Radhakrishnan <ramana at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-02-23
                 CC|                            |ramana at gcc dot gnu.org
     Ever Confirmed|0                           |1

--- Comment #4 from Ramana Radhakrishnan <ramana at gcc dot gnu.org> 2012-02-23 02:24:10 UTC ---
I suppose confirmed :)


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug target/52187] armeb-unknown-eabi not recognized as big-endian
  2012-02-09 17:53 [Bug other/52187] New: armeb-unknown-eabi not recognized as big-endian egnor at ofb dot net
                   ` (3 preceding siblings ...)
  2012-02-23  2:36 ` ramana at gcc dot gnu.org
@ 2013-02-15 18:35 ` sethml at google dot com
  2013-03-20  0:44 ` pinskia at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: sethml at google dot com @ 2013-02-15 18:35 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52187

Seth LaForge <sethml at google dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sethml at google dot com

--- Comment #5 from Seth LaForge <sethml at google dot com> 2013-02-15 18:34:41 UTC ---
Patch submitted:
http://gcc.gnu.org/ml/gcc-patches/2013-02/msg00785.html


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug target/52187] armeb-unknown-eabi not recognized as big-endian
  2012-02-09 17:53 [Bug other/52187] New: armeb-unknown-eabi not recognized as big-endian egnor at ofb dot net
                   ` (4 preceding siblings ...)
  2013-02-15 18:35 ` sethml at google dot com
@ 2013-03-20  0:44 ` pinskia at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2013-03-20  0:44 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52187

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |build
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.8.0

--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> 2013-03-20 00:44:45 UTC ---
Fixed by:
2013-02-22  Seth LaForge  <sethml@google.com>

        * config.gcc (arm*-*-eabi*): Treat arm*eb as big-endian.


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-03-20  0:44 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-09 17:53 [Bug other/52187] New: armeb-unknown-eabi not recognized as big-endian egnor at ofb dot net
2012-02-09 18:04 ` [Bug target/52187] " pinskia at gcc dot gnu.org
2012-02-09 18:06 ` egnor at ofb dot net
2012-02-10 19:01 ` rearnsha at gcc dot gnu.org
2012-02-23  2:36 ` ramana at gcc dot gnu.org
2013-02-15 18:35 ` sethml at google dot com
2013-03-20  0:44 ` pinskia at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).