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 pB8Da3Yr027859 for ; Thu, 8 Dec 2011 14:36:03 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ar0CALi84E6K54gDgWdsb2JhbABDqmciAQEWJiWBcgEBBTIBRhALGAklDwJGBg0BBwK/MIs7BJRrhUuMXA X-IronPort-AV: E=Sophos;i="4.71,320,1320620400"; d="scan'208";a="122592837" Received: from rouge.crans.org ([138.231.136.3]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/ADH-AES256-SHA; 08 Dec 2011 14:35:58 +0100 Received: from localhost (localhost.crans.org [127.0.0.1]) by rouge.crans.org (Postfix) with ESMTP id 6162385BE; Thu, 8 Dec 2011 14:35:57 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at crans.org Received: from rouge.crans.org ([10.231.136.3]) by localhost (rouge.crans.org [10.231.136.3]) (amavisd-new, port 10024) with LMTP id Zwe3+ag6pOPM; Thu, 8 Dec 2011 14:35:57 +0100 (CET) Received: from [152.81.3.42] (wencory.loria.fr [152.81.3.42]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by rouge.crans.org (Postfix) with ESMTPSA id 3B31D80E4; Thu, 8 Dec 2011 14:35:57 +0100 (CET) Message-ID: <4EE0BD3C.20806@glondu.net> Date: Thu, 08 Dec 2011 14:35:56 +0100 From: =?ISO-8859-1?Q?St=E9phane_Glondu?= User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111114 Icedove/3.1.16 MIME-Version: 1.0 To: Nicholas Lucaroni CC: "caml-list@inria.fr" References: <4EE0A829.1000902@glondu.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Subject: Re: [Caml-list] Compiling shared library with ocamlopt On 12/08/2011 02:11 PM, Nicholas Lucaroni wrote: > From ocamlbuild, possibly from my plugin for it, but I should be able to > set cc and shared? They don't seem like mutually exclusive options. It works if you add -cc "gcc -shared", or -ccopt -shared. Looking at call_linker in utils/ccomp.ml, it seems to be by design: the command to link executables and the command to link plugins are two different variables, that are both overridden by the -cc option. I suggest you to add -ccopt -shared when linking a plugin in your myocamlbuild.ml (or not using -cc at all). Cheers, -- Stéphane