From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 325E181798 for ; Fri, 5 Jul 2013 09:09:53 +0200 (CEST) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of mauny.inria@gmail.com) identity=pra; client-ip=74.125.82.173; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="mauny.inria@gmail.com"; x-sender="mauny.inria@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of mauny.inria@gmail.com designates 74.125.82.173 as permitted sender) identity=mailfrom; client-ip=74.125.82.173; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="mauny.inria@gmail.com"; x-sender="mauny.inria@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-we0-f173.google.com) identity=helo; client-ip=74.125.82.173; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="mauny.inria@gmail.com"; x-sender="postmaster@mail-we0-f173.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjsBAOdw1lFKfVKtk2dsb2JhbABagzvBeBYOAQEBAQcLCwkUBCSCIwEBBTIBDQESJQIDDAEFBRgJFg8JAwIBAgEiAQUBHBMIAQGHeQMPBAibV49MhDMnDYhLAQUMjhKBaoNXA5dJj2A/gV2CXA X-IPAS-Result: AjsBAOdw1lFKfVKtk2dsb2JhbABagzvBeBYOAQEBAQcLCwkUBCSCIwEBBTIBDQESJQIDDAEFBRgJFg8JAwIBAgEiAQUBHBMIAQGHeQMPBAibV49MhDMnDYhLAQUMjhKBaoNXA5dJj2A/gV2CXA X-IronPort-AV: E=Sophos;i="4.87,1000,1363129200"; d="scan'208";a="24689025" Received: from mail-we0-f173.google.com ([74.125.82.173]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 05 Jul 2013 09:09:39 +0200 Received: by mail-we0-f173.google.com with SMTP id x54so1665252wes.4 for ; Fri, 05 Jul 2013 00:09:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:organization:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=xcTDZy0JFWSw6OCHIZgdCRhNA3bhYnh1G9V84YGUMdI=; b=yhl8e1M1jpVxBhG79aeOdlOchiZh7JmpRb3PA40yskpSfd3meFCqXAX+wnF91mTzDZ 1h2KqqwZI501ia5tzVtpHiyHZl+LNmNWb4DwyZ2/sDcH9RAFOSPmA2ywDSwofRJKD04n B4RX6sKroLgoADXfOPg8uSLOTKnogUwZVKI4ecjQGE+si5yZawIqS6WlYPz7sGJ+eNTG 4FZBfjfltAL3EiijL2jDBBW+24Q78xLed2HTJSCbhLHqDPAS9fvK1OSukLSOxlz0tDKw qVZlnTR+D0+xLqCo5cgBBeFJ/ve8laO53eH/jCRpGHFlcJ22mWP2HMr7Bokf6WGCuYup wyCg== X-Received: by 10.180.211.49 with SMTP id mz17mr16094373wic.23.1373008178776; Fri, 05 Jul 2013 00:09:38 -0700 (PDT) Received: from pcmm.ensta.fr (finiasz.net. [94.23.15.65]) by mx.google.com with ESMTPSA id i1sm38612045wiz.6.2013.07.05.00.09.36 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 05 Jul 2013 00:09:37 -0700 (PDT) Sender: Michel Mauny Message-ID: <51D67143.7050100@inria.fr> Date: Fri, 05 Jul 2013 09:09:55 +0200 From: Michel Mauny Organization: ENSTA-ParisTech User-Agent: Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.8.1.6) Gecko/20070728 Thunderbird/6.0.1 Mnenhy/0.7.5.0 MIME-Version: 1.0 To: caml-list@inria.fr References: <51B1EBC1.3010401@lexifi.com> <20130703154910.GA23355@annexia.org> <51D4CB15.3070400@riken.jp> <51D519D4.4030205@inria.fr> <20130704213820.GA23943@annexia.org> In-Reply-To: <20130704213820.GA23943@annexia.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Subject: Re: [Caml-list] OCaml on zLinux Hi, Richard W.M. Jones écrit/writes [04/07/2013 23:38] : > On Thu, Jul 04, 2013 at 08:44:36AM +0200, Michel Mauny wrote: >> Works out of the box, and has good performances. It does not support >> yet dynamic loading, though. >> >> No known bug, but reports, comments and contributions (through github) are welcome. > > How plausible is writing an 'ocamlopt' wrapper that would just work? For those who don't know OCamlCC, its primary usage is the following: ocamlcc main.byte where main.byte is a bytecode executable produced by ocamlc. OCamlCC first translates main.byte to a C file that #includes the OCaml runtime, and calls gcc (or whatever C compiler you specified at config time or using the -cc option) on it and produces an executable file (a.out). See the man page, or the OUD 2012 page for our short paper, slides and presentation on a preliminary version of OCamlCC for more info: http://oud.ocaml.org/2012/#program Back to the original question, it's easy to write a script that would take a list of .ml files, compile them with ocamlc, and call ocamlcc on the bytecode. One could probably be smarter in mimicking the behavior of ocamlc to have separate compilation, and calling ocamlcc at link time. We will probably extend ocamlcc argument processing to OCaml source files (.ml, .mli), and compile them with ocamlc. Now, I don't think it would be a good idea to call this ocamlopt, since ocamlcc is an extension of ocamlc compilation chain, whereas ocamlopt is not. Best, -- Michel Mauny ENSTA ParisTech