11466 – '-mlittle-endian' doesn't work with GCC3.2.3 under Solaris 2.x (original) (raw)
Description Goeran Jerke 2003-07-08 14:10:22 UTC
The compiler option '-mlittle-endian' doesn't work under Sun Sparc/Solaris 2.x even with the CPU type selectors '-mcpu=ultrasparc -mtune=ultrasparc'.
Comment 1 Wolfgang Bangerth 2003-07-08 14:31:56 UTC
This is because this option doesn't exist for SPARC, see the manual. Why do you think it should work? And what exactly do you mean by "does not work"?
W.
Comment 2 Goeran Jerke 2003-07-08 14:47:16 UTC
Subject: Re: '-mlittle-endian' doesn't work with GCC3.2.3 under Solaris 2.x
Have a look at:
The option -mlittle-endian exists in the manual for SPARC !
http://gcc.gnu.org/onlinedocs/gcc-3.3/gcc/SPARC-Options.html#SPARC%20Options
For GCC 3.2.3 its the same.
I was wondering anyway since SPARC processors run in big-endian mode.
Goeran
bangerth at dealii dot org wrote:
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, NOT gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11466
bangerth at dealii dot org changed:
What |Removed |Added
Status|UNCONFIRMED |RESOLVED Resolution| |INVALID------- Additional Comments From bangerth at dealii dot org 2003-07-08 14:31 ------- This is because this option doesn't exist for SPARC, see the manual. Why do you think it should work? And what exactly do you mean by "does not work"?
W.
------- You are receiving this mail because: ------- You reported the bug, or are watching the reporter.
Comment 3 Wolfgang Bangerth 2003-07-08 15:44:20 UTC
Ah I see, thanks. The docs are inconsistent: in the overall option summary, -mlittle-endian is stated for several targets, but not for sparc, whereas the sparc submodel section has such an entry.
I'll try to figure out who put it in there.
Thanks W.
Comment 4 Eric Botcazou 2003-07-08 15:55:43 UTC
Note that the option is supposed to be supported on SPARC-V9 processors (Ultrasparc, Ultrasparc3).
Comment 5 Wolfgang Bangerth 2003-07-08 16:01:11 UTC
OK, I did some archeology -- these options have been listed in invoke.texi since the very first revision of this file under doc/invoke.texi. Before that, the file existed in the gcc subdirectory, and there, the option description dates back to the very first version, checked in by Jeff Law in August 1997. So I guess these things predate the egcs era.
Eric, you have recently done all the sparc stuff. The compiler just complains that this option doesn't exist, even if I give -mcpu=ultrasparc so I guess the manual is plain wrong, or what is the answer. I admit that the manual is at least a) inconsisten (w.r.t. option summary and the sparc option listing) and b) confusing (w.r.t. which cpu switch has to be given to allow -mlittle-endian). What do you suggest?
W.
Comment 6 Eric Botcazou 2003-07-08 18:53:21 UTC
I don't really know for the time being. I'll try to further investigate.
Comment 7 Eric Botcazou 2003-07-14 10:23:29 UTC
It appears that the -mlittle-endian option is only supported for the triplets: sparc64--openbsd sparc64--elf sparclet--aout
Additionally, -mlittle-endian-data is supported for the triplet: sparc86x--elf
Only Linux, OpenBSD and NetBSD seem to be able to handle little-endian code on SPARC processors.