From: Alexandre Oliva <aoliva@redhat.com>
To: gcc@gcc.gnu.org
Subject: mips-linux-gnu doesn't use SIZE_TYPE/PTRDIFF_TYPE from mips.h
Date: Sat, 05 Oct 2002 11:13:00 -0000 [thread overview]
Message-ID: <orbs696o40.fsf@free.redhat.lsd.ic.unicamp.br> (raw)
[-- 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
next reply other threads:[~2002-10-05 12:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-05 11:13 Alexandre Oliva [this message]
2002-10-06 1:02 ` Eric Christopher
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=orbs696o40.fsf@free.redhat.lsd.ic.unicamp.br \
--to=aoliva@redhat.com \
--cc=gcc@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).