Richard Earnshaw <rearn...@arm.com> writes:
> On 29/06/11 12:28, Richard Sandiford wrote:
>> ARM has an option called -mwords-little-endian that provides big-endian
>> compatibility with pre-2.8 compilers.  When I asked Richard about it,
>> he seemed to think it had outlived its usefulness, so this patch
>> deprecates it.  We can then remove it once 4.7 is out.
>> 
>> Tested on arm-linux-gnueabi.  OK to install?  If so, I'll do a patch
>> for the web page as well.
>> 
>
> Please also update the in-line help text in arm.opt.  OK with that change.

Thanks.  I've attached the patch I applied below.

How's this for the docs change?

--------------------------------------------------------------------------
Index: htdocs/gcc-4.7/changes.html
===================================================================
RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-4.7/changes.html,v
retrieving revision 1.20
diff -u -r1.20 changes.html
--- htdocs/gcc-4.7/changes.html 6 Jul 2011 23:37:11 -0000       1.20
+++ htdocs/gcc-4.7/changes.html 7 Jul 2011 15:17:03 -0000
@@ -43,6 +43,9 @@
     only intended as a migration aid from SunOS 4 to SunOS 5.  The
     <code>-compat-bsd</code> compiler option is not recognized any
     longer.</li>
+
+    <li>The ARM port's <code>-mwords-little-endian</code> option has
+    been deprecated.  It will be removed in a future release.</li>
   </ul>
 
 <h2>General Optimizer Improvements</h2>
--------------------------------------------------------------------------

I wondered about expanding it a bit (describing why the option was added
and why it's no longer needed).  It felt like overkill for such a niche
option though.

Richard


gcc/
        * doc/invoke.texi (mwords-little-endian): Deprecate.
        * config/arm/arm.opt (mwords-little-endian): Likewise.
        * config/arm/arm.c (arm_option_override): Warn about the deprecation
        of -mwords-little-endian.

Index: gcc/doc/invoke.texi
===================================================================
--- gcc/doc/invoke.texi 2011-07-04 09:09:02.000000000 +0100
+++ gcc/doc/invoke.texi 2011-07-04 13:50:06.000000000 +0100
@@ -10239,7 +10239,7 @@ Generate code for a little-endian word o
 order.  That is, a byte order of the form @samp{32107654}.  Note: this
 option should only be used if you require compatibility with code for
 big-endian ARM processors generated by versions of the compiler prior to
-2.8.
+2.8.  This option is now deprecated.
 
 @item -mcpu=@var{name}
 @opindex mcpu
Index: gcc/config/arm/arm.opt
===================================================================
--- gcc/config/arm/arm.opt      2011-06-22 16:46:28.000000000 +0100
+++ gcc/config/arm/arm.opt      2011-07-04 13:52:38.000000000 +0100
@@ -235,7 +235,7 @@ Tune code for the given processor
 
 mwords-little-endian
 Target Report RejectNegative Mask(LITTLE_WORDS)
-Assume big endian bytes, little endian words
+Assume big endian bytes, little endian words.  This option is deprecated.
 
 mvectorize-with-neon-quad
 Target Report Mask(NEON_VECTORIZE_QUAD)
Index: gcc/config/arm/arm.c
===================================================================
--- gcc/config/arm/arm.c        2011-07-01 05:37:51.000000000 +0100
+++ gcc/config/arm/arm.c        2011-07-04 13:50:06.000000000 +0100
@@ -1483,6 +1483,10 @@ arm_option_override (void)
   if (TARGET_APCS_FLOAT)
     warning (0, "passing floating point arguments in fp regs not yet 
supported");
 
+  if (TARGET_LITTLE_WORDS)
+    warning (OPT_Wdeprecated, "%<mwords-little-endian%> is deprecated and "
+            "will be removed in a future release");
+
   /* Initialize boolean versions of the flags, for use in the arm.md file.  */
   arm_arch3m = (insn_flags & FL_ARCH3M) != 0;
   arm_arch4 = (insn_flags & FL_ARCH4) != 0;

Reply via email to