On Thu, May 31, 2012 at 06:35:19AM -0700, H.J. Lu wrote: > This patch makes __WCHAR_TYPE__/wchar_t the same for gcc -m32 on > Linux/i386 and Linux/x86-64. OK for trunk?
That looks wrong. For Linux/i386, the 32-bit only compiler should be the standard, rather than x86_64 -m32 if they differ. So, IMHO you should keep gnu-user.h as is, and just use #define WCHAR_TYPE (TARGET_64BIT ? "int" : "long int") in gcc/config/i386/x86-64.h. > 2012-05-31 H.J. Lu <hongjiu...@intel.com> > > PR target/53539 > * config/i386/gnu-user.h (WCHAR_TYPE): Use "int". > (WCHAR_TYPE_SIZE): Set to 32. > > diff --git a/gcc/config/i386/gnu-user.h b/gcc/config/i386/gnu-user.h > index 9020be9..f88cbad 100644 > --- a/gcc/config/i386/gnu-user.h > +++ b/gcc/config/i386/gnu-user.h > @@ -53,10 +53,10 @@ along with GCC; see the file COPYING3. If not see > #define PTRDIFF_TYPE "int" > > #undef WCHAR_TYPE > -#define WCHAR_TYPE "long int" > +#define WCHAR_TYPE "int" > > #undef WCHAR_TYPE_SIZE > -#define WCHAR_TYPE_SIZE BITS_PER_WORD > +#define WCHAR_TYPE_SIZE 32 > > /* Provide a LINK_SPEC appropriate for GNU userspace. Here we provide > support > for the special GCC options -static and -shared, which allow us to Jakub