public inbox for java-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
To: gcc-patches@gcc.gnu.org
Cc: java-patches@gcc.gnu.org, libffi-discuss@sourceware.org
Subject: [libffi] Build 64-bit multilib for i?86-linux
Date: Tue, 13 Dec 2011 17:41:00 -0000	[thread overview]
Message-ID: <yddaa6wqsie.fsf@manam.CeBiTec.Uni-Bielefeld.DE> (raw)

[-- Attachment #1: Type: text/plain, Size: 1100 bytes --]

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.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: linx86-libffi64.patch --]
[-- Type: text/x-patch, Size: 270 bytes --]

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*-*-*)

[-- Attachment #3: Type: text/plain, Size: 143 bytes --]


-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

                 reply	other threads:[~2011-12-13 17:41 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=yddaa6wqsie.fsf@manam.CeBiTec.Uni-Bielefeld.DE \
    --to=ro@cebitec.uni-bielefeld.de \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=java-patches@gcc.gnu.org \
    --cc=libffi-discuss@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).