Bug 11466 - '-mlittle-endian' doesn't work with GCC3.2.3 under Solaris 2.x
'-mlittle-endian' doesn't work with GCC3.2.3 under Solaris 2.x
Status: RESOLVED FIXED
Product: gcc
Classification: Unclassified
Component: other
3.2.3
: P2 normal
: 3.3.1
Assigned To: Eric Botcazou
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2003-07-08 14:10 UTC by Goeran Jerke
Modified: 2003-07-25 23:28 UTC (History)
1 user (show)

See Also:
Host: sparc-sun-solaris2.*
Target: Sparc
Build:
Known to work:
Known to fail:
Last reconfirmed: 2003-07-08 16:01:12


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.
Comment 8 CVS Commits 2003-07-17 07:30:11 UTC
Subject: Bug 11466

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	ebotcazou@gcc.gnu.org	2003-07-17 07:30:08

Modified files:
	gcc            : ChangeLog 
	gcc/doc        : invoke.texi 

Log message:
	PR other/11466
	* doc/invoke.texi (SPARC Options): Document "-mlittle-endian"
	and its restrictions for the SPARC64 port.
	Move the entry of "-mimpure-text" before that of "-mv8".

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.538&r2=2.539
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/doc/invoke.texi.diff?cvsroot=gcc&r1=1.319&r2=1.320

Comment 9 CVS Commits 2003-07-17 07:34:39 UTC
Subject: Bug 11466

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_3-branch
Changes by:	ebotcazou@gcc.gnu.org	2003-07-17 07:34:34

Modified files:
	gcc            : ChangeLog 
	gcc/doc        : invoke.texi 

Log message:
	PR other/11466
	* doc/invoke.texi (SPARC Options): Document "-mlittle-endian"
	and its restrictions for the SPARC64 port.
	
	Backport from mainline:
	2003-06-13  Florian Weimer  <fw@deneb.enyo.de>
	
	* doc/invoke.texi (SPARC Options): Document "-mimpure-text".

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.16114.2.667&r2=1.16114.2.668
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/doc/invoke.texi.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.209.2.40&r2=1.209.2.41

Comment 10 Eric Botcazou 2003-07-17 07:39:53 UTC
See http://gcc.gnu.org/ml/gcc-patches/2003-07/msg01548.html