Browse thread
[Caml-list] Writing a JIT compiler
-
Jon Harrop
- Benjamin Geer
-
Basile Starynkevitch [local]
-
Basile Starynkevitch [local]
- Daniel_Bünzli
-
Julian Brown
- Basile Starynkevitch [local]
-
Basile Starynkevitch [local]
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2004-06-26 (19:19) |
From: | Basile Starynkevitch [local] <basile.starynkevitch@i...> |
Subject: | Re: [Caml-list] Re: Writing a JIT compiler |
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