public inbox for libc-ports@sourceware.org
 help / color / mirror / Atom feed
* [PATCH][MIPS] clang support
@ 2011-06-04 16:40 Aurelien Jarno
  2011-06-06 13:03 ` Joseph S. Myers
  0 siblings, 1 reply; 4+ messages in thread
From: Aurelien Jarno @ 2011-06-04 16:40 UTC (permalink / raw)
  To: libc-ports

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-06-06 19:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-04 16:40 [PATCH][MIPS] clang support Aurelien Jarno
2011-06-06 13:03 ` Joseph S. Myers
2011-06-06 13:56   ` Maciej W. Rozycki
2011-06-06 19:00     ` Aurelien Jarno

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).