public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Joseph S. Myers" <joseph@codesourcery.com>
To: Tom Tromey <tromey@redhat.com>
Cc: gcc-patches@gcc.gnu.org, java-patches@gcc.gnu.org,
	bonzini@gnu.org,     dj@redhat.com, neroden@gcc.gnu.org,
	aoliva@redhat.com,     Ralf.Wildenhues@gmx.de, green@redhat.com
Subject: Re: Toplevel cleanup: disable Java when libffi not supported
Date: Fri, 29 Apr 2011 23:24:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.64.1104292251310.20841@digraph.polyomino.org.uk> (raw)
In-Reply-To: <m38vutdnx2.fsf@fleche.redhat.com>

On Fri, 29 Apr 2011, Tom Tromey wrote:

> >>>>> "Joseph" == Joseph S Myers <joseph@codesourcery.com> writes:
> 
> Joseph> This patch, relative to a tree with
> Joseph> <http://gcc.gnu.org/ml/gcc-patches/2011-04/msg02123.html> applied,
> Joseph> continues the cleanup of toplevel cases relating to disabling Java or
> Joseph> Java libraries by arranging for Java to be disabled (via
> Joseph> unsupported_languages) on targets not supporting libffi
> 
> It does make sense to build libjava without libffi.
> 
> It just means that libjava has somewhat degraded functionality -- libffi
> is needed for the interpreter, for JNI, and for some kinds of reflection
> (Method.invoke).
> 
> I am not sure if there are any existing targets where libjava works but
> libffi does not.  Looking at libjava/configure.host, maybe `arm*-elf'
> (but maybe configure.host is out of data, it is certainly possible).

arm*-elf are targets where libffi's configure thinks it is supported.

> There is also --without-libffi, though; I didn't look to see what your
> patch does with this.
> 
> A better gate for libjava might be boehm-gc.  It is required to run any
> sort of real program.

I should perhaps reiterate that I think the toplevel handles 
unsupported_languages in a suboptimal way.  What it should mean in my view 
is that the languages don't get enabled by default (or by "all" in 
--enable-languages) but can still be enabled by specifying them manually 
in --enable-languages - whereas at present it forces the language to be 
disabled even if the user enables it explicitly.

So Java (and Go) should be disabled by default when libffi isn't 
supported, because they'd try by default to build libffi and so a default 
build will fail.  And much the same applies with boehm-gc.  But if a user 
explicitly enables Java on such a target, libffi should still be disabled 
as unsupported but the front end and other libraries should be built (and 
quite possibly fail).  (Ideally this would have generic logic - for each 
front end, disable it by default if any of the target libraries for that 
language aren't supported.  But that first requires a generic way to get 
information from a library directory about what targets that library 
supports.)

-- 
Joseph S. Myers
joseph@codesourcery.com

  parent reply	other threads:[~2011-04-29 22:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-27 16:06 Toplevel cleanup: split out libgcj disabling Joseph S. Myers
2011-04-27 17:09 ` Toplevel cleanup: disable Java when libffi not supported Joseph S. Myers
2011-04-28  9:11   ` Paolo Bonzini
2011-04-28 14:01     ` Joseph S. Myers
2011-04-28 16:42   ` Toplevel cleanup: reduce libgcj disabling Joseph S. Myers
2011-04-28 17:56     ` Paolo Bonzini
2011-04-29 17:37   ` Toplevel cleanup: disable Java when libffi not supported Tom Tromey
2011-04-29 17:38     ` Ralf Corsepius
2011-04-29 23:24     ` Joseph S. Myers [this message]
2011-05-03 15:16       ` Tom Tromey
2011-04-27 17:59 ` Toplevel cleanup: split out libgcj disabling Mike Stump
2011-04-28  9:06 ` Paolo Bonzini

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=Pine.LNX.4.64.1104292251310.20841@digraph.polyomino.org.uk \
    --to=joseph@codesourcery.com \
    --cc=Ralf.Wildenhues@gmx.de \
    --cc=aoliva@redhat.com \
    --cc=bonzini@gnu.org \
    --cc=dj@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=green@redhat.com \
    --cc=java-patches@gcc.gnu.org \
    --cc=neroden@gcc.gnu.org \
    --cc=tromey@redhat.com \
    /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).