This is the mail archive of the
libffi-discuss@sourceware.org
mailing list for the libffi project.
[patch] Fix mipsel detection (from Python upstream)
- From: Samuli Suominen <ssuominen at gentoo dot org>
- To: libffi-discuss at sourceware dot org
- Date: Mon, 05 Oct 2009 21:32:55 +0300
- Subject: [patch] Fix mipsel detection (from Python upstream)
There's build problems with libffi bundled with python, on mipsel, as
following,
http://bugs.python.org/issue4305
http://bugs.gentoo.org/show_bug.cgi?id=266471
But I don't have a MIPS myself to test this patch, I've only converted
it from the python's upstream patch since the configure.ac is same.
In other words: Completely untested.
Thanks, Samuli
Fix configure.ac for MIPS, http://bugs.gentoo.org/show_bug.cgi?id=266471
--- libffi-3.0.8/configure.ac
+++ libffi-3.0.8/configure.ac
@@ -100,10 +100,10 @@
;;
mips-sgi-irix5.* | mips-sgi-irix6.*)
- TARGET=MIPS; TARGETDIR=mips
+ TARGET=MIPS_IRIX; TARGETDIR=mips
;;
mips*-*-linux*)
- TARGET=MIPS; TARGETDIR=mips
+ TARGET=MIPS_LINUX; TARGETDIR=mips
;;
powerpc*-*-linux* | powerpc-*-sysv*)
@@ -156,7 +156,7 @@
AC_MSG_ERROR(["libffi has not been ported to $host."])
fi
-AM_CONDITIONAL(MIPS, test x$TARGET = xMIPS)
+AM_CONDITIONAL(MIPS,[expr x$TARGET : 'xMIPS' > /dev/null])
AM_CONDITIONAL(SPARC, test x$TARGET = xSPARC)
AM_CONDITIONAL(X86, test x$TARGET = xX86)
AM_CONDITIONAL(X86_FREEBSD, test x$TARGET = xX86_FREEBSD)