This is the mail archive of the
libc-ports@sources.redhat.com
mailing list for the libc-ports project.
Re: [PATCH][MIPS] clang support
On Mon, Jun 06, 2011 at 02:55:36PM +0100, Maciej W. Rozycki wrote:
> On Mon, 6 Jun 2011, Joseph S. Myers wrote:
>
> > > When trying to build clang programs on MIPS, they fail as clang doesn't
> > > export the _MIPS_SZPTR builtin. The patch below fixes that by using
> > > _MIPS_SZPTR when available with a fallback on __INTPTR_WIDTH__.
> >
> > Maciej, any comments on where the API for predefined macros on MIPS
> > (_MIPS_SIM, _MIPS_SZPTR, etc.) comes from and whether it is documented?
>
> This was originally defined by SGI. One documentary reference I have is:
> "MIPSpro(TM) Compiling and Performance Tuning Guide" SGI's document
> #007-2360-008.
>
> > I'm inclined to think it's a bug in any MIPS compiler (or at least any
> > compiler for MIPS Linux) to fail to define these macros.
>
> I agree. Any Linux userland C code specifically crafted for a MIPS
> processor will assume these macros are available. Note that some of them
> are defined by <sgidefs.h> rather than the compiler itself (the API is
> somewhat odd).
>
Thanks for the details. It is now clear to me that it has to be fixed,
the clang side.
--
Aurelien Jarno GPG: 1024D/F1BCDB73
aurelien@aurel32.net http://www.aurel32.net