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 pB8KR7JQ007859 for ; Thu, 8 Dec 2011 21:27:07 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtsCAIMc4U7RVdgvimdsb2JhbABDmnCHZAGGdIEZCCIBAQEKCQ0HEgYhgXIBAQEDARICLAEbHQEDAQsBBQUEAQYNLiIBEQEFARwGEyKHZZsKCotkgmuEPT2IcQIFDIsvBIgujD2NcD2BTYJK X-IronPort-AV: E=Sophos;i="4.71,321,1320620400"; d="scan'208";a="122650642" Received: from mail-qw0-f47.google.com ([209.85.216.47]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 08 Dec 2011 21:27:01 +0100 Received: by qadb17 with SMTP id b17so1074890qad.6 for ; Thu, 08 Dec 2011 12:27:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=Ovachi2K/4nc+wChE9md3C0pkcY9XHpZzT1FjGtePU4=; b=pwcz85YOPWpgmX8xPLln1Hcclc/Xb/H6Rgp6SkDO33BTtc1pDs6jYlXgv1eid2ZVr2 DioK95o1mQy16i0FHinWx/Qyuhjb7VuV2qCi2qjbde3wPcEh8z3vM3M81tfFuuRexaGL BVF+ydSkkcHj0eIxbb9TkvpPaXfQTLAuXSrQ4= Received: by 10.224.217.66 with SMTP id hl2mr4438011qab.84.1323376020493; Thu, 08 Dec 2011 12:27:00 -0800 (PST) MIME-Version: 1.0 Sender: trigger0219@gmail.com Received: by 10.229.74.66 with HTTP; Thu, 8 Dec 2011 12:26:29 -0800 (PST) In-Reply-To: <4EE0BD3C.20806@glondu.net> References: <4EE0A829.1000902@glondu.net> <4EE0BD3C.20806@glondu.net> From: Nick Lucaroni Date: Thu, 8 Dec 2011 15:26:29 -0500 X-Google-Sender-Auth: 6yExdVFPaKc-1hjkQYydqTKtdKc Message-ID: To: =?ISO-8859-1?Q?St=E9phane_Glondu?= Cc: "caml-list@inria.fr" Content-Type: multipart/alternative; boundary=20cf300face99b13fb04b39a7d84 Subject: Re: [Caml-list] Compiling shared library with ocamlopt --20cf300face99b13fb04b39a7d84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Yeah, that's what someone had mentioned on another forum. I had also mentioned there that passing the -ccopt -shared works, and it's my current plan of attack. I wish I could get ride of -cc, but it's necessary for x-compiling and (semi-necessary) for mpi. Thanks for your help though. On Thu, Dec 8, 2011 at 8:35 AM, St=E9phane Glondu wrote: > 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=E9phane > --20cf300face99b13fb04b39a7d84 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Yeah, that's what someone had mentioned on another forum. I had also me= ntioned there that passing the -ccopt -shared works, and it's my curren= t plan of attack. I wish I could get ride of -cc, but it's necessary fo= r x-compiling and (semi-necessary) for mpi.

Thanks for your help though.


On Thu, Dec 8, 2011 at 8:35 AM, St=E9phane Glondu <= span dir=3D"ltr"><steph@glondu.net> wrote:
On 12/08/2011 02:11 PM, N= icholas 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. L= ooking 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 (o= r not using -cc at all).


Cheers,

--
St=E9phane

--20cf300face99b13fb04b39a7d84--