When including <sys/immu.h> (which mozilla likes to do) the compilation halts with the masseage: parse error before pte_t. <sys/immu.h> contains some very low-level stuff which is ignored if the exact architecture is unknown (this is what happens then using the native compiler). The problem is that gcc defines "R4000" when using -mabi=n32 (not then using -mabi=32), which disables the excusion of all the low-level stuff, but doesn't include all of it either. The solution I can think of is either to NOT define "R4000" (which again is what the native compiler does). Or to also define "IP20", "IP22", "IP28" or "IPMHSIM", which would make <sys/immu.h> go through the compiler but I have no idea if it's the correct thing to do.
Confirmed. Of the two choices you mention, I think it would be better to remove the R3000 and R4000 macros for IRIX. Another option would be to use fixincludes, but I think removing the macros is better. Like you say, MIPSpro doesn't define them, even in underscore form, and they've always been a bit flawed anyway. [ Reasoning: the macros sound like they're indicators of the target ISA, but they really indicators of "64-bitness". __mips is a better choice if you want to know the specific ISA level and __mips64 is better if you just want to know whether the code is 64-bit or not. ] I'll try to bootstrap the obvious patch soon, but the irix box I use is a bit under the weather right now.
Subject: Bug 16830 CVSROOT: /cvs/gcc Module name: gcc Changes by: rsandifo@gcc.gnu.org 2004-11-06 22:34:01 Modified files: gcc : ChangeLog gcc/config/mips: mips.h Log message: PR target/16830 * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Don't define the R3000 and R4000 macros on IRIX. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.6210&r2=2.6211 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/mips/mips.h.diff?cvsroot=gcc&r1=1.374&r2=1.375
Fixed in mainline: http://gcc.gnu.org/ml/gcc-patches/2004-11/msg00513.html