PATCH: Support Linux/mips in libffi
H . J . Lu
hjl@lucon.org
Sun Jun 9 20:40:00 GMT 2002
This patch adds the Linux/mips support to libffi. With this patch
and the one I submitted for boehm-gc, I got
make[5]: Entering directory `/export/build/gnu/gcc-3.1/build-mipsel-linux/mipsel-pc-linux-gnu/libjava/testsuite'
srcdir=`cd /home/hjl/work/gnu/src/gcc-3.1/gcc/libjava/testsuite && pwd`; export srcdir; \
EXPECT=`if [ -f ../../expect/expect ] ; then echo ../../expect/expect ; else echo expect ; fi`; export EXPECT; \
runtest=`if [ -f /home/hjl/work/gnu/src/gcc-3.1/gcc/libjava/../dejagnu/runtest ] ; then echo /home/hjl/work/gnu/src/gcc-3.1/gcc/libjava/../dejagnu/runtest ; else echo runtest; fi`; \
if /bin/sh -c "$runtest --version" > /dev/null 2>&1; then \
$runtest --tool libjava --srcdir $srcdir ; \
else echo "WARNING: could not find \`runtest'" 1>&2; :;\
fi
WARNING: Couldn't find the global config file.
Test Run By hjl on Sun Jun 9 14:07:08 2002
Native configuration is mipsel-pc-linux-gnu
=== libjava tests ===
Schedule of variations:
unix
Running target unix
Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target.
Using /usr/share/dejagnu/config/unix.exp as generic interface file for target.
Using /home/hjl/work/gnu/src/gcc-3.1/gcc/libjava/testsuite/config/default.exp as tool-and-target-specific interface file.
Running /home/hjl/work/gnu/src/gcc-3.1/gcc/libjava/testsuite/libjava.compile/compile.exp ...
XPASS: Where compilation from source
XPASS: Where -O compilation from source
XPASS: inner_1 compilation from source
XPASS: inner_1 -O compilation from source
Running /home/hjl/work/gnu/src/gcc-3.1/gcc/libjava/testsuite/libjava.jni/jni.exp ...
FAIL: calls output
Running /home/hjl/work/gnu/src/gcc-3.1/gcc/libjava/testsuite/libjava.lang/lang.exp ...
FAIL: invokethrow execution from source compiled test
FAIL: invokethrow execution from bytecode->native test
FAIL: invokethrow -O execution from source compiled test
FAIL: invokethrow -O execution from bytecode->native test
FAIL: InvokeReturn output from source compiled test
FAIL: InvokeReturn output from bytecode->native test
FAIL: InvokeReturn -O output from source compiled test
FAIL: InvokeReturn -O output from bytecode->native test
FAIL: Throw_2 execution from source compiled test
FAIL: Throw_2 execution from bytecode->native test
FAIL: Throw_2 -O execution from source compiled test
FAIL: Throw_2 -O execution from bytecode->native test
Running /home/hjl/work/gnu/src/gcc-3.1/gcc/libjava/testsuite/libjava.mauve/mauve.exp ...
=== libjava Summary ===
# of expected passes 2054
# of unexpected failures 13
# of unexpected successes 4
# of expected failures 14
# of untested testcases 14
I also tested it on Irix 6.5:
http://gcc.gnu.org/ml/gcc-testresults/2002-06/msg00244.html
H.J.
-------------- next part --------------
2002-06-09 H.J. Lu (hjl@gnu.org)
* Makefile.am (TARGET_SRC_MIPS_LINUX): New.
(libffi_la_SOURCES): Support MIPS_LINUX.
(libffi_convenience_la_SOURCES): Likewise.
* Makefile.in: Regenerated.
* configure.in (mips64*-*): Skip.
(mips*-*-linux*): New.
* configure: Regenerated.
* src/mips/ffi.c: Include <sgidefs.h>.
--- libffi/Makefile.am.mips Fri Apr 5 23:28:02 2002
+++ libffi/Makefile.am Sun Jun 2 13:46:56 2002
@@ -92,6 +92,7 @@ ffitest_LDADD = libffi.la
ffitest_LDFLAGS = -shared-libgcc
TARGET_SRC_MIPS_GCC = src/mips/ffi.c src/mips/o32.S src/mips/n32.S
+TARGET_SRC_MIPS_LINUX = src/mips/ffi.c src/mips/o32.S
TARGET_SRC_MIPS_SGI = src/mips/ffi.c src/mips/o32.s src/mips/n32.s
TARGET_SRC_X86 = src/x86/ffi.c src/x86/sysv.S
TARGET_SRC_X86_WIN32 = src/x86/ffi.c src/x86/win32.S
@@ -112,6 +113,10 @@ if MIPS_GCC
libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_GCC)
libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_GCC)
endif
+if MIPS_LINUX
+libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_LINUX)
+libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_LINUX)
+endif
if MIPS_SGI
libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_SGI)
libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_SGI)
--- libffi/configure.in.mips Sun May 19 21:49:39 2002
+++ libffi/configure.in Sun Jun 2 13:48:40 2002
@@ -61,6 +61,8 @@ sparc64-*-linux*) TARGET=SPARC; TARGETDI
alpha*-*-linux* | alpha*-*-osf* | alpha*-*-freebsd*) TARGET=ALPHA; TARGETDIR=alpha;;
ia64*-*-*) TARGET=IA64; TARGETDIR=ia64;;
m68k-*-linux*) TARGET=M68K; TARGETDIR=m68k;;
+mips64*-*);;
+mips*-*-linux*) TARGET=MIPS_LINUX; TARGETDIR=mips;;
powerpc-*-linux* | powerpc-*-sysv*) TARGET=POWERPC; TARGETDIR=powerpc;;
powerpc-*-beos*) TARGET=POWERPC; TARGETDIR=powerpc;;
powerpc-*-darwin*) TARGET=POWERPC_DARWIN; TARGETDIR=powerpc;;
@@ -75,6 +77,7 @@ fi
AM_CONDITIONAL(MIPS_GCC, test ${TARGET}${ac_cv_prog_gcc} = MIPSyes)
AM_CONDITIONAL(MIPS_SGI, test ${TARGET}${ac_cv_prog_gcc} = MIPSno)
+AM_CONDITIONAL(MIPS_LINUX, test x$TARGET = xMIPS_LINUX)
AM_CONDITIONAL(SPARC, test x$TARGET = xSPARC)
AM_CONDITIONAL(X86, test x$TARGET = xX86)
AM_CONDITIONAL(X86_WIN32, test x$TARGET = xX86_WIN32)
@@ -86,6 +89,10 @@ AM_CONDITIONAL(POWERPC_AIX, test x$TARGE
AM_CONDITIONAL(POWERPC_DARWIN, test x$TARGET = xPOWERPC_DARWIN)
AM_CONDITIONAL(ARM, test x$TARGET = xARM)
+if test x$TARGET = xMIPS_LINUX; then
+ TARGET=MIPS
+fi
+
AC_HEADER_STDC
AC_CHECK_FUNCS(memcpy)
AC_FUNC_ALLOCA
--- libffi/src/mips/ffi.c.mips Fri Mar 2 14:21:23 2001
+++ libffi/src/mips/ffi.c Sun Jun 2 13:44:36 2002
@@ -23,6 +23,7 @@
OTHER DEALINGS IN THE SOFTWARE.
----------------------------------------------------------------------- */
+#include <sgidefs.h>
#include <ffi.h>
#include <ffi_common.h>
More information about the Gcc-patches
mailing list