From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id pB9EpEgU017363 for ; Fri, 9 Dec 2011 15:51:14 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhIBAL4f4k5KfVM2kGdsb2JhbABDqnEIIgEBAQEJCQ0HFAQhgXIBAQEBAgEMBgIsAQE3AQQLCzQSNAEFARwGNYdlApkiCoozhBwBjgMHiw9jomU9g3o X-IronPort-AV: E=Sophos;i="4.71,326,1320620400"; d="scan'208";a="122761759" Received: from mail-ee0-f54.google.com ([74.125.83.54]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 09 Dec 2011 15:51:09 +0100 Received: by eekc50 with SMTP id c50so2184022eek.27 for ; Fri, 09 Dec 2011 06:51:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; bh=X75jmoeBYvQxyKf0WCZC1t6LuqaLATTBEu/xhN+ehvU=; b=HX9fwTecanCgbKa5FrkczOksQ4H403FBfbkgs36xR4GsQgAQDtWb6h29TK4XqN5dvC 9BnRxeb+qpCRqwoopP4UWdPJVIkQzBjN3r3SbcJrkHIJdW9tuTYoo/bRue8RP9hvx+Sm z20qgaXceAj+CDL/qa0fcPG/0ea8uBA3psKfc= Received: by 10.14.10.93 with SMTP id 69mr881597eeu.201.1323442268763; Fri, 09 Dec 2011 06:51:08 -0800 (PST) Received: from coruscant.kosmos.all (ip-95-223-170-32.unitymediagroup.de. [95.223.170.32]) by mx.google.com with ESMTPS id 58sm31932041eet.11.2011.12.09.06.51.06 (version=SSLv3 cipher=OTHER); Fri, 09 Dec 2011 06:51:07 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v1251.1) Content-Type: text/plain; charset=iso-8859-1 From: Benedikt Meurer In-Reply-To: <4EE21B89.2010306@gmail.com> Date: Fri, 9 Dec 2011 15:51:05 +0100 Cc: caml-list@inria.fr Message-Id: References: <20111209065758.94306.qmail@eeoth.pair.com> <4EE1BE59.4020804@glondu.net> <59A74C55-C12B-4C98-9496-2E83BE8A39F0@googlemail.com> <4EE21B89.2010306@gmail.com> To: =?iso-8859-1?Q?T=F6r=F6k_Edwin?= X-Mailer: Apple Mail (2.1251.1) Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by walapai.inria.fr id pB9EpEgU017363 Subject: Re: [Caml-list] Why NOT to compile OCaml via C On Dec 9, 2011, at 15:30 , Török Edwin wrote: >> Just drop Colin a mail and ask him for the current patch (should be for 2.7 or 2.8, IIRC). > > FWIW 3.0 has some fixes in the OCaml bindings that may (or may not) be useful for you, like: > findlib support, string_of_lltype not dieing on recursive structs, bindings to ipo.h, > bindings to some additional C APIs that were missing from the OCaml ones, > support for creating landing pads. The prototype should not use the C/OCaml API, but emit a textual representation instead (for various reasons). The work is based on an earlier prototype I did some time ago and that was based on LLVM 2.7. IIRC Colin ported that to 2.8, because 2.9 had some fundamental differences that caused trouble with the custom calling conventions. I haven't looked into this myself, but I'm sure we can port the final patch to 3.0 once things proved working. >>> I think it is natural that you have to make changes to LLVM, >>> the GHC people (which now have an experimental LLVM backend) also did, >>> and I was under the impression that the LLVM people where quite >>> welcoming of their changes, they are glad to see LLVM being used in a >>> non-Clang-centric project. I think your patches could bring value to >>> LLVM, independently of the success of the ambitious ocaml backend >>> attempt. >> >> Hm, I'm not sure. It's really easy to generate LLVM code for OCaml in general, the problem is getting things to interact with legacy OCaml code, with exception handling being one of the most important issue. The required stuff will be very platform specific and very specific to OCaml, and we don't even know if it's going to work. > > Is binary compatibility with a specific version of ocamlopt necessary? It's a "nice to have" thing. > Best regards, > --Edwin Benedikt