From: ludo@gnu.org (Ludovic Courtès)
To: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
Cc: Guix-devel <guix-devel@gnu.org>
Subject: Re: [PATCH]: Add GCJ
Date: Fri, 23 Jan 2015 22:09:34 +0100 [thread overview]
Message-ID: <87oapprypd.fsf@gnu.org> (raw)
In-Reply-To: <idjr3ulu64j.fsf@bimsb-sys02.mdc-berlin.net> (Ricardo Wurmus's message of "Fri, 23 Jan 2015 11:46:20 +0100")
Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> 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’s a bootstrapping issue–same problem as for GHC, MIT/GNU Scheme,
or the whole distro actually. I wouldn’t be surprised if ecj.jar cannot
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 <ricardo.wurmus@mdc-berlin.de>
> 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 = gnu/packages/javac.in
and in Makefile.am, change the nobase_dist_guilemodule_DATA line to:
nobase_dist_guilemodule_DATA = \
$(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 ‘append’.
> +(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-" version ".jar"))
> + (sha256
> + (base32
> + "10fpqfbdzff1zcbxzh66xc8xbij9saykcj4xzm19wk9p3n7i5zcq"))))
It’s enough to make it an ‘origin’, and to keep it private:
(define ecj-bootstrap-4.8
(origin
(method ...)
...))
Thanks,
Ludo’.
next prev parent reply other threads:[~2015-01-23 21:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-23 10:46 [PATCH]: Add GCJ Ricardo Wurmus
2015-01-23 21:09 ` Ludovic Courtès [this message]
2015-01-26 12:57 ` Ricardo Wurmus
2015-01-26 20:26 ` Ludovic Courtès
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=87oapprypd.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=guix-devel@gnu.org \
--cc=ricardo.wurmus@mdc-berlin.de \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.