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 p0OF4cCQ019156 for ; Mon, 24 Jan 2011 16:04:38 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqoBAEEjPU1RZ90wkWdsb2JhbACkaBUBAQEBCQsKBxEDIbtRhVAEiyA X-IronPort-AV: E=Sophos;i="4.60,370,1291590000"; d="scan'208";a="85899981" Received: from mtaout02-winn.ispmail.ntl.com ([81.103.221.48]) by mail4-smtp-sop.national.inria.fr with ESMTP; 24 Jan 2011 16:04:32 +0100 Received: from aamtaout02-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout02-winn.ispmail.ntl.com (InterMail vM.7.08.04.00 201-2186-134-20080326) with ESMTP id <20110124150431.JJGU19887.mtaout02-winn.ispmail.ntl.com@aamtaout02-winn.ispmail.ntl.com> for ; Mon, 24 Jan 2011 15:04:31 +0000 Received: from romulus.metastack.com ([81.102.132.77]) by aamtaout02-winn.ispmail.ntl.com (InterMail vG.3.00.04.00 201-2196-133-20080908) with ESMTP id <20110124150431.RJZK25842.aamtaout02-winn.ispmail.ntl.com@romulus.metastack.com> for ; Mon, 24 Jan 2011 15:04:31 +0000 Received: from remus.metastack.local ([172.16.0.1]) by romulus.metastack.com (8.14.2/8.14.2) with ESMTP id p0OF4TCC002872 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL) for ; Mon, 24 Jan 2011 15:04:29 GMT Received: from Remus.metastack.local ([fe80::547c:3c42:e1da:eda2]) by Remus.metastack.local ([fe80::547c:3c42:e1da:eda2%11]) with mapi; Mon, 24 Jan 2011 15:00:22 +0000 From: David Allsopp To: "'OCaml List (caml-list@inria.fr)'" Thread-Topic: Forcing gcc/ocamlopt to link against specific versions of libc.so and libm.so Thread-Index: Acu71NDDtpwDLXTCQnuSiDSAV90rHA== Date: Mon, 24 Jan 2011 15:00:21 +0000 Message-ID: Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.65 on 81.102.132.77 X-Cloudmark-Analysis: v=1.1 cv=R50lirqlHffDPPkwUlkuVa99MrvKdVWo//yz83qex8g= c=1 sm=0 a=aNWDG5nvF5YA:10 a=kj9zAlcOel0A:10 a=xqWC_Br6kY4A:10 a=mcDt7x5xtwTcUa8CsA0A:9 a=FWLBqtsLuZhc1ADvtMgA:7 a=s8HFsPdP6vDOJEBl2c5MZ1DdF_4A:4 a=CjuIK1q_8ugA:10 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by walapai.inria.fr id p0OF4cCQ019156 Subject: [Caml-list] Forcing gcc/ocamlopt to link against specific versions of libc.so and libm.so [I think this question is more about gcc options than anything else so please don't be put off by the fact it's about FreeBSD!] I'm working with OCaml 3.12.0 on FreeBSD 8.1 and need to produce native binaries which are compatible with FreeBSD 6.4. I have therefore installed the compat6x package. FreeBSD 8.1 has /lib/libm.so.5 and /lib/libc.so.7 and the compat6x package gives me /usr/local/lib/compat/libm.so.4 and /usr/local/lib/compat/libc.so.6 as they're what shipped in FreeBSD 6.x My question therefore is twofold: 1. What do I have to pass to gcc to tell it to use the older libm.so.4 and libc.so.6? 2. What's the best way to pass those instructions to OCaml's configure script? At the moment, after running configure I've simply edited config/Makefile and put -static before -lm in NATIVECCLIBS but that's obviously producing executables which are a bit larger than I'd like (and I expect that kills native dynlink as well?) Any help much appreciated! David