From: "Basile Starynkevitch [local]" <basile.starynkevitch@inria.fr>
To: caml-list@inria.fr
Subject: Re: [Caml-list] Re: Writing a JIT compiler
Date: Sat, 26 Jun 2004 21:18:41 +0200 [thread overview]
Message-ID: <20040626191840.GA11474@bourg.inria.fr> (raw)
In-Reply-To: <slrncdqvd2.vqq.brown@panic.cs.bris.ac.uk>
On Sat, Jun 26, 2004 at 01:45:02PM +0000, Julian Brown wrote:
> On 2004-06-25, Basile Starynkevitch [local]
> <basile.starynkevitch@inria.fr> wrote:
> > Also note that ocamljitrun is a binary which is a plugin replacement
> > for ocamlrun, this means that (as far as I understand your needs) you
> > don't need to link it with your program. This means that the
> > hypothetical linking issues of the LGPL is not a concern. In my
> > non-lawyer opinion, ocamljitrun is like ocamlrun so can run any
> > program you like, including commercial ones.
My feeling is that custom linking is nearly obsolete - better use dll
libraries which are well supported in ocaml now.
> Sorry for changing the subject, but can ocamljitrun be used with
> "ocamlc -custom"? I have a program which uses some small C modules,
> and I couldn't find an obvious way to make it compile or run using
> ocamljitrun. AFAIK, -custom links the bytecode interpreter with the
> binary as part of its magic.
It is doable by linking the libcamljitrun.a instead of
libcamlrun.a. Since -lcamlrun is a builtin library name (in ocamlc
-custom), the trick (suggested by Xavier Leroy) is to copy
libcamljitrun.a into a unique directory like
/usr/local/lib/ocamljitdir/ and pass -cclib
-L/usr/local/lib/ocamljitdir/ to your ocamlc command.
> On topic, does that affect licencing? It doesn't really matter to me,
> but it might for some people I guess...
Ocamljitrun is under LGPL as is GNU lightning. I believe that the
special exception applying to Ocaml like software like ocamljitrun do
not apply to the GNU lightning library, which is LGPL, but as I said
many times, I AM NOT A LAWYER.
the Ocamljit library should be buildable as a shared library - just
edit the GNUUmakefile of ocamljit appropriately to add -fPIC to the
compilation command, and build a shared library instead of a static
one. As usual on x86 there is a small penalty (because of register
shortage for global offset table access) in shared libraries.
--
Basile STARYNKEVITCH -- basile dot starynkevitch at inria dot fr
Project cristal.inria.fr - temporarily
http://cristal.inria.fr/~starynke --- all opinions are only mine
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
prev parent reply other threads:[~2004-06-26 19:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-25 8:04 [Caml-list] " Jon Harrop
2004-06-25 8:52 ` Benjamin Geer
2004-06-25 9:53 ` Jon Harrop
2004-06-25 10:56 ` Basile Starynkevitch [local]
2004-06-25 9:59 ` Basile Starynkevitch [local]
[not found] ` <200406251325.15940.postmaster@jdh30.plus.com>
2004-06-25 15:55 ` Basile Starynkevitch [local]
2004-06-25 17:05 ` Daniel Bünzli
2004-06-26 13:45 ` [Caml-list] " Julian Brown
2004-06-26 19:18 ` Basile Starynkevitch [local] [this message]
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=20040626191840.GA11474@bourg.inria.fr \
--to=basile.starynkevitch@inria.fr \
--cc=caml-list@inria.fr \
/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