This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch] libffi: Add MIPS64 support.
David,
While integrating into 4.1.2 I had a brief look over your patch again
over the weekend and I have got two minor points:
1. You use "unsigned" rather than "unsigned int", which makes your code
look a little bit too K&Rish.
2. Given the coverage FFI_MIPS_N32 should probably be renamed to
FFI_MIPS_NEWABI as it is now somewhat confusing.
And last but not least, with your changes there is now no difference
between Linux and IRIX anymore, so it may be worth unifying the MIPS
target like the others; it seems to be the only oddball.
2007-08-13 Maciej W. Rozycki <macro@linux-mips.org>
* Makefile.am: Unify MIPS_IRIX and MIPS_LINUX into MIPS.
* configure.ac: Likewise.
* Makefile.in: Regenerate.
* configure: Regenerate.
OK to apply?
Maciej
gcc-4.3.0-20070813-mips64-linux-libffi.patch
diff -up --recursive --new-file gcc-4.3.0-20070813.macro/libffi/Makefile.am gcc-4.3.0-20070813/libffi/Makefile.am
--- gcc-4.3.0-20070813.macro/libffi/Makefile.am 2007-08-11 06:55:52.000000000 +0000
+++ gcc-4.3.0-20070813/libffi/Makefile.am 2007-08-13 16:52:18.000000000 +0000
@@ -84,10 +84,7 @@ libffi_la_SOURCES = src/debug.c src/prep
nodist_libffi_la_SOURCES =
-if MIPS_IRIX
-nodist_libffi_la_SOURCES += src/mips/ffi.c src/mips/o32.S src/mips/n32.S
-endif
-if MIPS_LINUX
+if MIPS
nodist_libffi_la_SOURCES += src/mips/ffi.c src/mips/o32.S src/mips/n32.S
endif
if X86
diff -up --recursive --new-file gcc-4.3.0-20070813.macro/libffi/configure.ac gcc-4.3.0-20070813/libffi/configure.ac
--- gcc-4.3.0-20070813.macro/libffi/configure.ac 2007-08-11 06:55:52.000000000 +0000
+++ gcc-4.3.0-20070813/libffi/configure.ac 2007-08-13 16:53:00.000000000 +0000
@@ -95,10 +95,10 @@ case "$host" in
;;
mips-sgi-irix5.* | mips-sgi-irix6.*)
- TARGET=MIPS_IRIX; TARGETDIR=mips
+ TARGET=MIPS; TARGETDIR=mips
;;
mips*-*-linux*)
- TARGET=MIPS_LINUX; TARGETDIR=mips
+ TARGET=MIPS; TARGETDIR=mips
;;
powerpc*-*-linux* | powerpc-*-sysv*)
@@ -151,8 +151,7 @@ if test $TARGETDIR = unknown; then
AC_MSG_ERROR(["libffi has not been ported to $host."])
fi
-AM_CONDITIONAL(MIPS_IRIX, test x$TARGET = xMIPS_IRIX)
-AM_CONDITIONAL(MIPS_LINUX, test x$TARGET = xMIPS_LINUX)
+AM_CONDITIONAL(MIPS, test x$TARGET = xMIPS)
AM_CONDITIONAL(SPARC, test x$TARGET = xSPARC)
AM_CONDITIONAL(X86, test x$TARGET = xX86)
AM_CONDITIONAL(X86_WIN32, test x$TARGET = xX86_WIN32)
@@ -176,11 +175,6 @@ AM_CONDITIONAL(PA_LINUX, test x$TARGET =
AM_CONDITIONAL(PA_HPUX, test x$TARGET = xPA_HPUX)
AM_CONDITIONAL(PA64_HPUX, test x$TARGET = xPA64_HPUX)
-case x$TARGET in
- xMIPS*) TARGET=MIPS ;;
- *) ;;
-esac
-
AC_HEADER_STDC
AC_CHECK_FUNCS(memcpy)
AC_FUNC_ALLOCA