<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE message PUBLIC
  "-//MLarc//DTD MLarc output files//EN"
  "../../mlarc.dtd"[
  <!ATTLIST message
    listname CDATA #REQUIRED
    title CDATA #REQUIRED
  >
]>

  <?xml-stylesheet href="../../mlarc.xsl" type="text/xsl"?>


<message 
  url="2009/01/b6ec731a1ad0ce2723f34c141ebebb23"
  from="Sylvain Le Gall &lt;sylvain@l...&gt;"
  author="Sylvain Le Gall"
  date="2009-01-13T20:44:20"
  subject="Re: [Caml-list] Re: Ocaml back-end"
  prev="2009/01/2f5d00de6b9c387999dd888337bb57b9"
  next="2009/01/2d0fd29ad5fdd17ddd302a883b1cf36f"
  prev-in-thread="2009/01/2f5d00de6b9c387999dd888337bb57b9"
  prev-thread="2008/12/56cb2dafce388d96d3ec9da7e109a5ad"
  next-thread="2008/12/bfc08423fbf036e12a7860706af2cd10"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="Ocaml back-end">
<msg 
  url="2008/12/e1c166d91c52793afa0597da879f0454"
  from="Gilles Pirio &lt;gilles.ocaml@g...&gt;"
  author="Gilles Pirio"
  date="2008-12-06T12:48:29"
  subject="Ocaml back-end">
<msg 
  url="2008/12/9e05d7545bc515e47b54f6703d60c030"
  from="Edgar Friendly &lt;thelema314@g...&gt;"
  author="Edgar Friendly"
  date="2008-12-06T20:02:29"
  subject="Re: [Caml-list] Ocaml back-end">
</msg>
<msg 
  url="2008/12/54f27493dda33caa7cc95d1adb48ca0e"
  from="Sylvain Le Gall &lt;sylvain@l...&gt;"
  author="Sylvain Le Gall"
  date="2008-12-07T21:58:33"
  subject="Re: Ocaml back-end">
<msg 
  url="2008/12/bf1c5a5f35195f550465605c06374ef5"
  from="Gilles Pirio &lt;gilles.pirio@g...&gt;"
  author="Gilles Pirio"
  date="2008-12-09T15:51:44"
  subject="Re: [Caml-list] Re: Ocaml back-end">
<msg 
  url="2008/12/4c4ed47bd426bf33122fefee4a4cd4cc"
  from="Sylvain Le Gall &lt;sylvain@l...&gt;"
  author="Sylvain Le Gall"
  date="2008-12-09T23:44:05"
  subject="Re: Ocaml back-end">
<msg 
  url="2009/01/2f5d00de6b9c387999dd888337bb57b9"
  from="Gilles Pirio &lt;gilles.ocaml@g...&gt;"
  author="Gilles Pirio"
  date="2009-01-13T19:09:19"
  subject="Re: [Caml-list] Re: Ocaml back-end">
<msg 
  url="2009/01/b6ec731a1ad0ce2723f34c141ebebb23"
  from="Sylvain Le Gall &lt;sylvain@l...&gt;"
  author="Sylvain Le Gall"
  date="2009-01-13T20:44:20"
  subject="Re: [Caml-list] Re: Ocaml back-end">
</msg>
</msg>
</msg>
</msg>
</msg>
</msg>
</thread>

<contents>
Hello,

On Tue, Jan 13, 2009 at 07:09:16PM +0000, Gilles Pirio wrote:
&gt; Greetings all..
&gt; 
&gt; Following up on an idea explored few weeks ago, I've now implemented the
&gt; dynamic back-end mechanism on ocamlopt.
&gt; 
&gt; What would be the way to go for ocamlopt.opt? I don't think we want to have
&gt; this dynamic back-end thingie with opt.opt as native dynlink isn't supported on
&gt; all platforms. My approach at the momemt is to have different files for the
&gt; back-end loader (depending on whether it is an opt or opt.opt build). So the
&gt; makefile is a bit messier than before. Would that be ok anyway, any better way
&gt; to do that that I'm not aware of? If this is fine, I'll submit my patch.
&gt; 

You can play a little bit with camlp4 and pa_macro to disable certain
part of your opt.opt (like replacing dynlink call by nothing/empty
list...).

I think you can try doing this kind of conditional compilation well
enough if your changes are located in an almost central place

&gt; On Tue, Dec 9, 2008 at 7:31 PM, Sylvain Le Gall &lt;sylvain@le-gall.net&gt; wrote:
&gt; 
&gt;     On 09-12-2008, Gilles Pirio &lt;gilles.pirio@gmail.com&gt; wrote:
&gt;     &gt;&gt; To my mind, the best way is to provide a patch through the bug tracking
&gt;     &gt;&gt; system of INRIA. This is highly probable that INRIA team doesn't accept
&gt;     &gt;&gt; it directly but ask you to justify/modify it in order to fit the whole
&gt;     &gt;&gt; compiler -- which could be quiet a long process in fact.
&gt;     &gt;
&gt;     &gt; It would greatly help to know what the INRIA team would consider as
&gt;     &gt; acceptable ahead of doing the work. What kind of guidlines would you
&gt;     &gt; advise me to follow? I guess I can add new passes but can I modify
&gt;     &gt; existing ones?
&gt;     &gt;
&gt;     &gt; The ideal solution would be to open the back-end using the dynlink
&gt;     &gt; library. I've done it with 3.11 to speed up development. The back-end is
&gt;     now
&gt;     &gt; a cmo file. I separately compile copt0.cmo, copt1.cmo... with different
&gt;     &gt; back-ends. Then I can use command like: ocamlopt -copt copt0.cmo
&gt;     myfile.ml
&gt;     &gt; to compile with my back-end.
&gt;     &gt; But even though that's a small change I'm not sure the INRIA guys would
&gt;     &gt; like it, right?
&gt;     &gt;
&gt;     &gt;
&gt; 
&gt;     This idea rocks! The best way is to begin by providing a basic patch and
&gt;     follow this explanation:
&gt;     http://et.redhat.com/~rjones/how-to-supply-code-to-open-source-projects/
&gt;     (even if it is not said, half of the people involved are OCaml
&gt;     developers).
&gt; 
&gt;     The other idea is that the smallest is the best. That's why your idea
&gt;     rocks. If the possibility to dynamically load backend is small, it will
&gt;     be a very good first step.
&gt; 
&gt;     When you will have made this first step (that can profit to all), you
&gt;     can either submit your backend or provide it by any other mean.
&gt; 
&gt;     Regards
&gt;     Sylvain Le Gall
&gt; 
&gt;     ps: consider fecthing a copy of the CVS

Regards
Sylvain Le Gall

</contents>

</message>

