This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[3.1-branch PATCH] fix mips CPP size specs for MEABI.


The patch below (or one like it) is needed to compile gcc 3.1-branch
for target mipsisa32-elf.  without it, the build croaks in
libstdc++-v3, w/ size_t type problems.

This patch is by no means perfect; instead it was meant to be 'lower
risk'.

I believe the more correct solution to this problem is already checked
in on the trunk in mips.h, in the patches in revisions 1.160-1.162 and
1.164.  (Yes, a total of 4 patches over the course of a few days.  8-)

Those patches (three from Alex, one from me) completely redid the mips
LONG_MAX_SPEC and SUBTARGET_CPP_SIZE_SPEC.

This one is much less complete.  Really, MEABI support should be in
all of the definitions of those macros, but, currently, it's not.  I
only fix it in the places that include that support, namely, the code
used when MEABI is the default ABI.  The only target that uses that,
and thus the only impacted by this patch, is current mipsisa32-elf
AFAICT.


Verified that w/ this patch the compiler & libstdc++-v3 builds for
target mipsisa32-elf, host sparc solaris.


Thoughts?


chris
===================================================================
2002-04-26  Chris Demetriou  <cgd@broadcom.com>

	* config/mips/mips.h (SUBTARGET_CPP_SIZE_SPEC): Get closer to
	correct for MEABI (used by mipsisa32-elf).

Index: config/mips/mips.h
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/config/mips/mips.h,v
retrieving revision 1.154.2.2
diff -u -p -r1.154.2.2 mips.h
--- config/mips/mips.h	24 Mar 2002 08:13:16 -0000	1.154.2.2
+++ config/mips/mips.h	26 Apr 2002 17:05:20 -0000
@@ -1094,9 +1094,7 @@ extern int mips_abi;
    %{mgp32:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}} \
  %{!mlong64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}} \
 %{mabi=32:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}\
-%{mabi=meabi|!mabi=*:\
-  %{mips3|mips4|mips5|mips64|mlong64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \
-  %{!mips3:%{!mips4:%{!mips5:%{!mips64:%{!mlong64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}}}}}} \
+%{mabi=meabi|!mabi=*:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \
 "
 #endif
 
@@ -1177,9 +1175,7 @@ extern int mips_abi;
    %{mgp32:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}} \
  %{!mlong64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}} \
 %{mabi=32:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}\
-%{mabi=meabi|!mabi=*:\
-  %{mips1|mips2|mips32|mlong32: -D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \
-  %{!mips1:%{!mips2:%{!mips32:%{!mlong32:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int}}}}} \
+%{mabi=meabi|!mabi=*:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \
 "
 #endif
 






Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]