From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH]: Add GCJ Date: Fri, 23 Jan 2015 22:09:34 +0100 Message-ID: <87oapprypd.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46088) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YElU5-0005ni-OB for guix-devel@gnu.org; Fri, 23 Jan 2015 16:09:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YElU2-0004RZ-FN for guix-devel@gnu.org; Fri, 23 Jan 2015 16:09:41 -0500 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:46050) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YElU2-0004RV-CD for guix-devel@gnu.org; Fri, 23 Jan 2015 16:09:38 -0500 In-Reply-To: (Ricardo Wurmus's message of "Fri, 23 Jan 2015 11:46:20 +0100") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Ricardo Wurmus Cc: Guix-devel Ricardo Wurmus skribis: > this patch adds the GNU Compiler for Java to the gcc module. We need > GCJ to build IcedTea6 / OpenJDK, which in turn could be used to build > IcedTea7. Nice! > GCJ unfortunately has a binary dependency, the Eclipse Compiler for > Java. GCJ expects to be given the path of the ecj.jar at compile time. > ECJ is provided as ecj-bootstrap-4.8. I don't know if GCJ is built such > that this ECJ binary is no longer required at the end (but I know that > IcedTea6 also needs the ECJ jar). For IcedTea6 we could compile ECJ > from source with GCJ, but I don't know how to deal with GCJ's dependency > on ECJ. Having it depend on a binary is ugly. Well it=E2=80=99s a bootstrapping issue=E2=80=93same problem as for GHC, MI= T/GNU Scheme, or the whole distro actually. I wouldn=E2=80=99t be surprised if ecj.jar c= annot be avoided at all. > GCJ is built with options to create symlinks to function as a primitive > JDK. It does not provide wrappers for javap and javac, so these are > added in an extra phase. I took the javac perl wrapper from Gentoo, but > I suppose a script in Guile might be nicer (there is no official > upstream source for the wrapper script, so we might as well roll our > own). Yeah, something nice to have for later. :-) > From 56f43a9042853aca79f60808a51d328dfbe420a3 Mon Sep 17 00:00:00 2001 > From: Ricardo Wurmus > Date: Tue, 23 Dec 2014 12:31:50 +0100 > Subject: [PATCH] gnu: Add GCJ > > * gnu/packages/gcc.scm (gcj-4.8, ecj-bootstrap-4.8): New variable. > * gnu/packages/javac.in: New file. You need something like this in gnu-system.am: MISC_DISTRO_FILES =3D gnu/packages/javac.in and in Makefile.am, change the nobase_dist_guilemodule_DATA line to: nobase_dist_guilemodule_DATA =3D \ $(MODULES) $(KCONFIGS) $(EXAMPLES) \ $(MISC_DISTRO_FILES) > + (inputs > + (append (package-inputs gcc-4.8) > + `(("fastjar" ,fastjar) > + ("perl" ,perl) > + ("javac.in" ,(search-path %load-path > + "gnu/packages/javac.in")) > + ("ecj-bootstrap" ,ecj-bootstrap-4.8)))) Minor issue: I would avoid comma alignment and use quasiquote + unquote-splicing rather than =E2=80=98append=E2=80=99. > +(define-public ecj-bootstrap-4.8 > + (package > + (name "ecj-bootstrap") > + (version "4.8") > + (source (origin > + (method url-fetch) > + (uri (string-append "ftp://sourceware.org/pub/java/ecj-" v= ersion ".jar")) > + (sha256 > + (base32 > + "10fpqfbdzff1zcbxzh66xc8xbij9saykcj4xzm19wk9p3n7i5zcq"))= )) It=E2=80=99s enough to make it an =E2=80=98origin=E2=80=99, and to keep it = private: (define ecj-bootstrap-4.8 (origin (method ...) ...)) Thanks, Ludo=E2=80=99.