This is the mail archive of the
libc-ports@sources.redhat.com
mailing list for the libc-ports project.
[PATCH][MIPS] clang support
- From: Aurelien Jarno <aurelien at aurel32 dot net>
- To: libc-ports at sourceware dot org
- Date: Sat, 4 Jun 2011 18:40:09 +0200
- Subject: [PATCH][MIPS] clang support
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__.
2011-06-04 Aurelien Jarno <aurelien@aurel32.net>
* sysdeps/mips/bits/wordsize.h(__WORDSIZE): Define from _MIPS_SZPTR
or __INTPTR_WIDTH__.
diff --git a/sysdeps/mips/bits/wordsize.h b/sysdeps/mips/bits/wordsize.h
index 06967e5..099dfdc 100644
--- a/sysdeps/mips/bits/wordsize.h
+++ b/sysdeps/mips/bits/wordsize.h
@@ -16,7 +16,13 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#define __WORDSIZE _MIPS_SZPTR
+#if defined (_MIPS_SZPTR)
+# define __WORDSIZE _MIPS_SZPTR
+#elif defined (__INTPTR_WIDTH__)
+# define __WORDSIZE __INTPTR_WIDTH__
+#else
+# error Cannot define __WORDSIZE
+#endif
#if _MIPS_SIM == _ABI64
# define __WORDSIZE_COMPAT32 1
#endif
--
Aurelien Jarno GPG: 1024D/F1BCDB73
aurelien@aurel32.net http://www.aurel32.net