At <http://gcc.gnu.org/ml/gcc-patches/2010-10/msg01104.html> I
enumerated the cases in GCC where WORDS_BIG_ENDIAN and
BYTES_BIG_ENDIAN may differ.  The ARM -mwords-little-endian case has
now had a deprecation patch submitted
<http://gcc.gnu.org/ml/gcc-patches/2011-06/msg02217.html> and approved
(with changes) but apparently not yet committed.  This patch fixes the
powerpc-wrs-vxworks* case, where as I noted before it's clearly a bug
to undefine and redefine only one of the two macros.

Tested building cc1 and xgcc for cross to powerpc-wrs-vxworks.
Committed as obvious.

2011-07-06  Joseph Myers  <jos...@codesourcery.com>

        * config/rs6000/vxworks.h (WORDS_BIG_ENDIAN): Define.

Index: gcc/config/rs6000/vxworks.h
===================================================================
--- gcc/config/rs6000/vxworks.h (revision 175913)
+++ gcc/config/rs6000/vxworks.h (working copy)
@@ -47,6 +47,8 @@
 /* Only big endian PPC is supported by VxWorks.  */
 #undef BYTES_BIG_ENDIAN
 #define BYTES_BIG_ENDIAN 1
+#undef WORDS_BIG_ENDIAN
+#define WORDS_BIG_ENDIAN 1
 
 /* We have to kill off the entire specs set created by rs6000/sysv4.h
    and substitute our own set.  The top level vxworks.h has done some

-- 
Joseph S. Myers
jos...@codesourcery.com

Reply via email to