From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id VAA24206; Sat, 26 Jun 2004 21:19:13 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id VAA23695 for ; Sat, 26 Jun 2004 21:19:12 +0200 (MET DST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i5QJJBSH006943 for ; Sat, 26 Jun 2004 21:19:11 +0200 Received: from bourg.inria.fr (bourg.inria.fr [128.93.11.100]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id VAA24140 for ; Sat, 26 Jun 2004 21:19:11 +0200 (MET DST) Received: from basile by bourg.inria.fr with local (Exim 4.34) id 1BeIhF-0002zt-1P for caml-list@inria.fr; Sat, 26 Jun 2004 21:18:41 +0200 Date: Sat, 26 Jun 2004 21:18:41 +0200 To: caml-list@inria.fr Subject: Re: [Caml-list] Re: Writing a JIT compiler Message-ID: <20040626191840.GA11474@bourg.inria.fr> References: <200406250904.09178.postmaster@jdh30.plus.com> <20040625095936.GA2041@bourg.inria.fr> <200406251325.15940.postmaster@jdh30.plus.com> <20040625155517.GA4087@bourg.inria.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6+20040523i From: "Basile Starynkevitch [local]" X-Miltered: at concorde with ID 40DDCC2F.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 basile:01 basile:01 2004:99 2004:99 ocamlrun:01 hypothetical:01 lgpl:01 ocamlrun:01 ocamlc:01 doable:01 libcamlrun:01 ocamlc:01 usr:01 usr:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Sat, Jun 26, 2004 at 01:45:02PM +0000, Julian Brown wrote: > On 2004-06-25, Basile Starynkevitch [local] > 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