public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* mips-linux-gnu doesn't use SIZE_TYPE/PTRDIFF_TYPE from mips.h
@ 2002-10-05 11:13 Alexandre Oliva
  2002-10-06  1:02 ` Eric Christopher
  0 siblings, 1 reply; 2+ messages in thread
From: Alexandre Oliva @ 2002-10-05 11:13 UTC (permalink / raw)
  To: gcc

[-- Attachment #1: Type: text/plain, Size: 503 bytes --]

It used to be possible to use mips-linux-gnu-gcc for
layout-compatibility tests with mips-sgi-irix6, even for the n32 and
n64 ABIs, but this is not possible at the moment because mips.h
doesn't override the definitions of SIZE_TYPE and PTRDIFF_TYPE from
svr4.h, that appears first in the tm_file list of mips*-*-linux*.
This patch fixes this problem, such that -mabi=n32 and -mabi=64 have
the expect effect in this toolchain, at least as far as compilation of
a preprocessed file goes.  Ok to install?


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: gcc-mips-size-ptrdiff-override.patch --]
[-- Type: text/x-patch, Size: 1054 bytes --]

Index: gcc/ChangeLog
from  Alexandre Oliva  <aoliva@redhat.com>

	* config/mips/mips.h (SIZE_TYPE, PTRDIFF_TYPE): Override
	previously definitions.

Index: gcc/config/mips/mips.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/mips/mips.h,v
retrieving revision 1.224
diff -u -p -r1.224 mips.h
--- gcc/config/mips/mips.h 1 Oct 2002 10:26:09 -0000 1.224
+++ gcc/config/mips/mips.h 5 Oct 2002 12:51:29 -0000
@@ -4584,15 +4584,14 @@ while (0)
 #define MIPS_UNMARK_STAB(code) ((code)-CODE_MASK)
 
 \f
-/* Default definitions for size_t and ptrdiff_t.  */
+/* Default definitions for size_t and ptrdiff_t.  We must override the
+   definitions from ../svr4.h on mips-*-linux-gnu.  */
 
-#ifndef SIZE_TYPE
+#undef SIZE_TYPE
 #define SIZE_TYPE (Pmode == DImode ? "long unsigned int" : "unsigned int")
-#endif
 
-#ifndef PTRDIFF_TYPE
+#undef PTRDIFF_TYPE
 #define PTRDIFF_TYPE (Pmode == DImode ? "long int" : "int")
-#endif
 
 /* See mips_expand_prologue's use of loadgp for when this should be
    true.  */

[-- Attachment #3: Type: text/plain, Size: 289 bytes --]


-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                 aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist                Professional serial bug killer

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

* Re: mips-linux-gnu doesn't use SIZE_TYPE/PTRDIFF_TYPE from mips.h
  2002-10-05 11:13 mips-linux-gnu doesn't use SIZE_TYPE/PTRDIFF_TYPE from mips.h Alexandre Oliva
@ 2002-10-06  1:02 ` Eric Christopher
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Christopher @ 2002-10-06  1:02 UTC (permalink / raw)
  To: Alexandre Oliva; +Cc: gcc, gcc-patches

On Sat, 2002-10-05 at 05:56, Alexandre Oliva wrote:
> It used to be possible to use mips-linux-gnu-gcc for
> layout-compatibility tests with mips-sgi-irix6, even for the n32 and
> n64 ABIs, but this is not possible at the moment because mips.h
> doesn't override the definitions of SIZE_TYPE and PTRDIFF_TYPE from
> svr4.h, that appears first in the tm_file list of mips*-*-linux*.
> This patch fixes this problem, such that -mabi=n32 and -mabi=64 have
> the expect effect in this toolchain, at least as far as compilation of
> a preprocessed file goes.  Ok to install?
> 

Yup.

-eric

-- 
Yuppies wear socks.

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

end of thread, other threads:[~2002-10-06  6:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-05 11:13 mips-linux-gnu doesn't use SIZE_TYPE/PTRDIFF_TYPE from mips.h Alexandre Oliva
2002-10-06  1:02 ` Eric Christopher

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).