From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.54) id 1FBZk6-0005fG-2D for garchives@archives.gentoo.org; Tue, 21 Feb 2006 15:47:58 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.5/8.13.5) with SMTP id k1LFk1ds019696; Tue, 21 Feb 2006 15:46:01 GMT Received: from banta-im.com (roy-rogers.nfic.com [208.231.230.100]) by robin.gentoo.org (8.13.5/8.13.5) with ESMTP id k1LFjxTS007888 for ; Tue, 21 Feb 2006 15:46:00 GMT Received: from by banta-im.com (8.9.3/8.9.3) with ESMTP id KAA01229; Tue, 21 Feb 2006 10:45:58 -0500 (EST) Message-ID: <43FB35B6.10105@gentoo.org> Date: Tue, 21 Feb 2006 10:45:58 -0500 From: Joshua Nichols User-Agent: Thunderbird 1.5 (X11/20051201) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-java@gentoo.org MIME-Version: 1.0 To: Gentoo Java CC: Hanno Meyer-Thurow Subject: Re: [gentoo-java] work on gcj for gentoo References: <20060221160425.b1478bdc.h.mth@web.de> In-Reply-To: <20060221160425.b1478bdc.h.mth@web.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Archives-Salt: 0ee13d30-ac25-479c-b7e1-79b69ca74566 X-Archives-Hash: fd48c361d67f256e03b2d46a9d656ac6 Hanno Meyer-Thurow wrote: > Hi list! > I would like to work on gcj for Gentoo. > I spoke with Andrew Cowie. He suggested me to send my ideas and > questions to this list to discuss. > > I know gcj is tricky. It has various issues. Still, it is quite interesting > to work on gcj. But as gcj is in portage right now it is hard to use for > an ebuild writer like myself. Just two main issues: > > * dependency tracking > * JDK-like environment > > For JDK-like environment, redhat has done much work on this already. It is, surprisingly enough, called java-gcj-compat. Take a look at the jpackage rpm for it [1]. You can find other sites for java-gcj-compat, but the jpackage rpm seems to have the highest version I was able to find. > However, I may write my ideas and questions: > > I thought in a gcj-4.1 / ecj combination. Use ecj to bytecompile Java > source to jar with gcj as backend. Then use gcj to create native > executables or libraries out of that jar files. Creating a database > via gcj-dbtool for jar / native code resolution. If possible Java to > native. > > java-gcj-compat actually uses ecj internally, along with some other magic. > The steps to take to get there > > * get gcj-jdk in portage > * use ecj as gcjs bytecompiler > * handle it via Gentoos java config > (gcj bytecompile is broken, > see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18131) > > (later) > > * Java to native compilation > * utilize gcj-dbtool for jar / native code resolution > (Whatever way it is wanted.) > > To stay sane we want to hack the ant-core dependency out of > eclipse-ecj package. Just try to compile ant-core with gcj. I have > ugly hacks (gcc PR19870) for ant-core-1.6.2 to bytecompile with gcj. > > This shouldn't be much of a problem. The build.xml is pretty trivial, so you should be able to replicate it using javac and jar. > No way. > > Then I have to get ant-core-1.6.5 to bytecompile with gcj / ecj which > fails right now - did not yet investigate any further. After these steps > are done we have the base (for interested ones to test gcj). > > I am no Java programmer. > I do packaging stuff and ugly hacking. ;) > > I will try to integrate gcj into Gentoos next Java config utility. > Just not to do the work of integration twice. > > There really isn't much 'integration' involved per se. You mostly just have to create an env file that contains information about JAVA_HOME, PATH, etc. Take a look at existing jdk/jre packages. > What I did already: > > * tweaked Andrew's gcj-jdk ebuild > -> ebuild / eclass split > * gcj-ecj ebuild > -> Java to native: ecj binary > > The very next steps should be: > > * better gcj-jdk ebuild > * fix ant-core issue with ecj > > Then, get back to plan. > > Reference - my overlay for these two ebuilds: > http://geki.ath.cx/hacks/gcj-overlay-2.tar.bz2 > > > Thanks in advance for help! > > > Regards, > Hanno > A few other things... I'm not fond of the name gcj-jdk. The ebuild Andrew made was just for gcj itself, without the Java compatibility stuff, iirc. -jdk suggests that it provides a usable JDK, which it doesn't as it was. Speaking of which, I think the added compatibility layer (for javac, java, etc) should be a separate package. I'm not sure if this was your intention or not. Either way, it would make sense, since you would most likely be able to use the same layer for different versions of gcj. Hope this helps, - Josh -- gentoo-java@gentoo.org mailing list