From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id ECF21BCA9 for ; Wed, 4 May 2005 14:52:10 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j44CqAVw012914 for ; Wed, 4 May 2005 14:52:10 +0200 Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id OAA20404 for ; Wed, 4 May 2005 14:52:10 +0200 (MET DST) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.191]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j44Cq9Lh031150 for ; Wed, 4 May 2005 14:52:09 +0200 Received: from [212.227.126.160] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 1DTJMD-0001Dr-00; Wed, 04 May 2005 14:52:05 +0200 Received: from [84.167.149.204] (helo=gate.lan.gerd-stolpmann.de) by mrelayng.kundenserver.de with asmtp (Exim 3.35 #1) id 1DTJMC-0006GF-00; Wed, 04 May 2005 14:52:04 +0200 Received: from flakew.lan.gerd-stolpmann.de (flakew.lan.gerd-stolpmann.de [192.168.0.32]) by gate.lan.gerd-stolpmann.de (Postfix) with ESMTP id F0FADC10A; Wed, 4 May 2005 14:52:02 +0200 (CEST) Subject: Re: Godi-problem: setting C-compiler/linker From: Gerd Stolpmann To: Markus Mottl Cc: Inria Ocaml Mailing List In-Reply-To: References: Content-Type: text/plain Date: Wed, 04 May 2005 14:52:01 +0200 Message-Id: <1115211121.6317.159.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.0.2 Content-Transfer-Encoding: 7bit X-Provags-ID: kundenserver.de abuse@kundenserver.de auth:a6865a839c0178d9aa0ce41878507ea2 X-Miltered: at concorde with ID 4278C57A.002 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 4278C579.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; gerd:01 stolpmann:01 markus:01 mottl:01 gcc:01 flags:01 flags:01 compiler:01 makefiles:01 -verbose:01 gcc:01 compilers:01 o'caml's:01 compiler:01 ocamlc:01 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.2 X-Spam-Level: Am Mittwoch, den 20.04.2005, 10:11 -0400 schrieb Markus Mottl: > Hi, > > we have discovered a linking problem with the OCaml-distribution in > Godi. We want to be able to choose different C-compilers (e.g. gcc33) > when compiling or linking. Unfortunately, Godi hacks the > OCaml-distribution to insert some additional flags for finding shared > libraries. These flags are lost when we want to set a compiler/linker > using "-cc". > > We could, of course, hard code these flags into our Makefiles, but > that's not particularly portable. Another way would be to link a dummy > file with flag "-verbose" and use pattern matching on the displayed > command line to extract the correct flags (very hacky, can easily > break). > > What would be a better (= simpler, more portable) solution to this problem? If it is only gcc, it might be an option to use the -V switch. It selects the version provided the compilers are installed into the same tree. E.g. gcc -V 3.3 would select the 3.3 version. I don't have a good answer if this is not an option. What I am generally missing is an official way to get O'Caml's configuration from the compiler, i.e. an extended ocamlc -v. Gerd -- ------------------------------------------------------------ Gerd Stolpmann * Viktoriastr. 45 * 64293 Darmstadt * Germany gerd@gerd-stolpmann.de http://www.gerd-stolpmann.de ------------------------------------------------------------