3.4 PATCH: Fix libffi MIPS O32/N64 ABI handling

Rainer Orth ro@TechFak.Uni-Bielefeld.DE
Wed Oct 8 11:54:00 GMT 2003


David,

> In file included from include/ffi.h:156,
>                  from ../../../gcccvs/gcc/libffi/src/debug.c:24:
> ../../../gcccvs/gcc/libffi/include/ffi_mips.h:39: error: parse error 
> before '--' token
> In file included from ../../../gcccvs/gcc/libffi/src/debug.c:24:

sorry about that.  It looks like config/mips/linux.h
(TARGET_OS_CPP_BUILTINS) is broken for the O32 ABI: it contains (copied
from iris6.h)

        builtin_define ("_MIPS_SIM=_MIPS_SIM_ABI32");		\

instead of this

	builtin_define ("_ABIO32=1");			\
	builtin_define ("_MIPS_SIM=_ABIO32");		\

in my current config/mips/iris6.h (not yet reviewed/installed).

_MIPS_SIM_ABI32 is only defined (on IRIX 6.5) in <sgidefs.h>.  The change
above matches what SGI's MIPSpro C compiler does and is obviously correct.

There is another place in mips.h where _MIPS_SIM_ABI32 is used.  It should
be corrected to use _ABIO32 like all the other _MIPS_SIM tests.

I'll prepare a patch.

	Rainer

-----------------------------------------------------------------------------
Rainer Orth, Faculty of Technology, Bielefeld University



More information about the Gcc-patches mailing list