This is the mail archive of the
libffi-discuss@sourceware.org
mailing list for the libffi project.
Problem configuring libffi when trying to cross-compile
- From: Boris Zbarsky <bzbarsky at MIT dot EDU>
- To: libffi-discuss at sourceware dot org
- Date: Mon, 25 Jan 2010 12:25:39 -0500
- Subject: Problem configuring libffi when trying to cross-compile
I was recently trying to cross-compile Mozilla (which uses libffi for
its js-ctypes module); compiling on a Linux host and creating Mac
binaries. See http://weblogs.mozillazine.org/bz/archives/020363.html
for the steps for setting up the toolchain and such.
During the configure step for libffi, the build fails. The relevant
configure call looks like this:
mozilla/js/ctypes/libffi/configure --disable-shared --enable-static
--disable-raw-api --enable-debug --with-pic
--build=x86_64-unknown-linux-gnu --host=i686-apple-darwin9
--target=i686-apple-darwin9
--cache-file=../../../js/ctypes/libffi/config.cache
--srcdir=/home/bzbarsky/mozilla/mac-test/mozilla/js/ctypes/libffi
(I tried various permutations of target and host, but they all had the
same effect). The failure is:
config.status: executing src commands
nsinstall.c
pathsub.c
ld: unknown option: --eh-frame-hdr
collect2: ld returned 1 exit status
The --eh-frame-hdr option is not in fact supported by Apple's ld (which
is not a gnu ld).
Other possibly-relevant output from the configure step:
checking whether we are cross compiling... yes
checking whether we are using the GNU C compiler... yes
checking if the linker (/Developer/usr/bin/ld) is GNU ld... no
configure: WARNING: using cross tools not prefixed with host triplet
If someone wants to try reproducing (and I do apologize for the very
non-minimal steps to reproduce), the mozconfig file I'm using is
attached, as well as a patch to mozilla's toplevel configure that is
needed to make sure libffi's configure is running independently of the
toplevel one.
I'm also happy to run whatever people want me to run locally to help
sort this out.
-Boris
Attachment:
libffi-configure.patch
Description: Text document
Attachment:
mozconfig
Description: Text document