From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25333 invoked by alias); 5 Oct 2002 12:56:18 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 25326 invoked from network); 5 Oct 2002 12:56:18 -0000 Received: from unknown (HELO lacrosse.corp.redhat.com) (66.187.233.200) by sources.redhat.com with SMTP; 5 Oct 2002 12:56:18 -0000 Received: from free.redhat.lsd.ic.unicamp.br (aoliva2.cipe.redhat.com [10.0.1.156]) by lacrosse.corp.redhat.com (8.11.6/8.9.3) with ESMTP id g95CuGP17942 for ; Sat, 5 Oct 2002 08:56:16 -0400 Received: from free.redhat.lsd.ic.unicamp.br (localhost.localdomain [127.0.0.1]) by free.redhat.lsd.ic.unicamp.br (8.12.5/8.12.5) with ESMTP id g95CuGM9006570 for ; Sat, 5 Oct 2002 09:56:16 -0300 Received: (from aoliva@localhost) by free.redhat.lsd.ic.unicamp.br (8.12.5/8.12.5/Submit) id g95CuGfL006507; Sat, 5 Oct 2002 09:56:16 -0300 To: gcc@gcc.gnu.org Subject: mips-linux-gnu doesn't use SIZE_TYPE/PTRDIFF_TYPE from mips.h From: Alexandre Oliva Organization: GCC Team, Red Hat Date: Sat, 05 Oct 2002 11:13:00 -0000 Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-SW-Source: 2002-10/txt/msg00350.txt.bz2 --=-=-= Content-length: 503 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? --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=gcc-mips-size-ptrdiff-override.patch Content-length: 1054 Index: gcc/ChangeLog from Alexandre Oliva * 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) -/* 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. */ --=-=-= Content-length: 289 -- 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 --=-=-=--