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 p0OGmeKH024146 for ; Mon, 24 Jan 2011 17:48:40 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApsEANI7PU0+lQkY/2dsb2JhbAClW7wVhVAEiyCDJYJ6 X-IronPort-AV: E=Sophos;i="4.60,370,1291590000"; d="scan'208";a="85907933" Received: from dragon.cc.colocall.com (HELO dragon.mykola.org) ([62.149.9.24]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 24 Jan 2011 17:48:34 +0100 Received: from [192.168.0.103] (SOL-FTTB.215.111.27.94.sovam.net.ua [94.27.111.215] (may be forged)) (authenticated bits=0) by dragon.mykola.org (8.14.3/8.14.3) with ESMTP id p0OGmIt5006903 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Mon, 24 Jan 2011 18:48:23 +0200 (EET) (envelope-from nick@mykola.org) Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: text/plain; charset=koi8-u From: =?koi8-u?B?7cnLz8zBIPPU0qTCy8/X?= In-Reply-To: Date: Mon, 24 Jan 2011 18:48:13 +0200 Cc: "'OCaml List (caml-list@inria.fr)'" Message-Id: <2ECBF6AC-5DB2-4C79-B6A0-BA9886A2687D@mykola.org> References: To: David Allsopp X-Mailer: Apple Mail (2.1082) Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by walapai.inria.fr id p0OGmeKH024146 Subject: Re: [Caml-list] Forcing gcc/ocamlopt to link against specific versions of libc.so and libm.so Hi, David On 24 Ó¦Þ. 2011, at 17:00, David Allsopp wrote: > 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? Look at the -nostartfiles, -nodefaultlibs and -nostdlib. Those options should allow you to pass exact libraries to linker. -- Mykola Stryebkov Public key: http://mykola.org/pubkey.txt fpr: 0226 54EE C1FF 8636 36EF 2AC9 BCE9 CFC7 9CF4 6747