This is the mail archive of the
libffi-discuss@sourceware.org
mailing list for the libffi project.
[libffi] Build 64-bit multilib for i?86-linux
- From: Rainer Orth <ro at CeBiTec dot Uni-Bielefeld dot DE>
- To: gcc-patches at gcc dot gnu dot org
- Cc: java-patches at gcc dot gnu dot org, libffi-discuss at sourceware dot org
- Date: Tue, 13 Dec 2011 18:40:57 +0100
- Subject: [libffi] Build 64-bit multilib for i?86-linux
I've recently tried a i686-unknown-linux-gnu --enable-targets=all
bootstrap, which failed to link the 64-bit jv-convert etc.:
./.libs/libgcj.so: undefined reference to `ffi_raw_call'
./.libs/libgcj.so: undefined reference to `ffi_prep_raw_closure_loc'
./.libs/libgcj.so: undefined reference to `ffi_prep_cif_machdep'
./.libs/libgcj.so: undefined reference to `ffi_prep_closure_loc'
./.libs/libgcj.so: undefined reference to `ffi_call'
collect2: error: ld returned 1 exit status
make[5]: *** [jv-convert] Error 1
This happens because libffi doesn't build the x86_64 objects in this
configuration. The following patch fixes this and allowed (together
with a libjava patch to be submitted shortly) the bootstrap to finish.
I've also bootstrapped x86_64-unknown-linux-gnu without regressions.
The same issue still exists in upstream libffi, and should be harmless
without --enable-targets=all since the added files are empty then.
Ok for mainline gcc?
Rainer
2011-12-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* configure.ac (i?86-*-*): Set TARGET to X86_64.
* configure: Regenerate.
diff --git a/libffi/configure.ac b/libffi/configure.ac
--- a/libffi/configure.ac
+++ b/libffi/configure.ac
@@ -99,7 +99,7 @@ case "$host" in
TARGET=X86_64; TARGETDIR=x86
;;
i?86-*-*)
- TARGET=X86; TARGETDIR=x86
+ TARGET=X86_64; TARGETDIR=x86
;;
ia64*-*-*)
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University