Gentoo Archives: gentoo-java

From: Karl Trygve Kalleberg <karltk@g.o>
To: Joshua Nichols <joshua.nichols@×××××.com>
Cc: gentoo-java@l.g.o
Subject: [gentoo-java] Re: filtering compilers for ejavac/eant
Date: Wed, 30 Nov 2005 02:04:37
Message-Id: 438D08A5.5000600@gentoo.org
Joshua Nichols wrote:
> Salutations,
Indeed:)
> I've been doing a little work on axxo's overlay recently, particularly > with choosing a sane compiler, ie it supports the desired -source and > -target. It seems there's a number of packages that jikes doesn't like > (surprise). I was talking with axxo about how to handle this, and > wanted some input from you. > > The current way of handling jikes is to not use eant/ejavac when the > package doesn't work with all the compilers. I'm not particularly fond > of this, because it doesn't give any indication that the package > doesn't work with a particular compiler. > > Instead, I think an ebuild should know that it doesn't work. As its > implemented, you can specify JAVA_PKG_FILTER_COMPILER to specify a > list of compilers not to use. I think that this should be used in > ebuilds that don't work with jikes (or alternatively, have a function > which handles this modifying this variable). > > Axxo had some reservations about this, because he thought it wouldn't > be much better than the old way of doing it with use flags. I don't > think this is quite the case though, you don't get 'use flag > pollution' with multiple compilers, and that most packages work with > all the compilers. > > Please let me know what you think.
Well, we need to come with *some* solution. As I see it, there are essentially two choices: 1a) For each package, we explictly list the compilers we know this package works with. This can be done in src_compile, via an eclass function; java-pkg_declare-compilers "javac ecj jikes". 1b) Same as 1a, but by default, we resort to a JAVA_SUPPORTED_COMPILERS variable defined in the java-pkg.eclass as the default setting. 2a) We do your filtering stuff. 2b) We define a fancy-schmancy filter function in the spirit of flag-o-matic, java-pkg_filter-compilers "jikes", and invoke this in src_compile before eant/ejavac/ewhatever For now, I don't see any other sane alternatives. My personal favourite is 2b, since there is already a long standing precedence with flag-o-matic on this. -- Karl T -- gentoo-java@g.o mailing list