From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19121 invoked by alias); 10 Jun 2008 19:43:00 -0000 Received: (qmail 19102 invoked by uid 22791); 10 Jun 2008 19:42:58 -0000 X-Spam-Check-By: sourceware.org Received: from c2bthomr05.btconnect.com (HELO C2bthomr05.btconnect.com) (213.123.20.123) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 10 Jun 2008 19:42:34 +0000 Received: from [192.168.1.100] (host81-138-1-83.in-addr.btopenworld.com [81.138.1.83]) by C2bthomr05.btconnect.com with ESMTP id IFC71309; Tue, 10 Jun 2008 20:42:30 +0100 (BST) In-Reply-To: <20080610190632.GF1722@ins.uni-bonn.de> References: <3D6964FD-6DF0-4F83-9932-6945316CFBF5@gmail.com> <20080610190632.GF1722@ins.uni-bonn.de> Mime-Version: 1.0 (Apple Message framework v753.1) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <98926BA1-55FA-4204-BC7E-79E992097812@sandoe-acoustics.co.uk> Cc: GCC Development , "fortran@gcc.gnu.org List" Content-Transfer-Encoding: 7bit From: IainS Subject: Re: [RFC, Patch, gfortran] make -static-libgfortran work on darwin. Date: Tue, 10 Jun 2008 19:43:00 -0000 To: Ralf Wildenhues X-Mailer: Apple Mail (2.753.1) X-Junkmail-Status: score=10/50, host=C2bthomr05.btconnect.com X-Junkmail-SD-Raw: score=unknown, refid=str=0001.0A090206.484ED927.01C6,ss=1,fgs=0, ip=192.168.1.100, so=2007-10-30 19:00:17, dmn=5.4.3/2008-02-01 X-Junkmail-IWF: false Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2008-06/txt/msg00260.txt.bz2 On 10 Jun 2008, at 20:06, Ralf Wildenhues wrote: > Hello, > > * FX wrote on Tue, Jun 10, 2008 at 05:59:36PM CEST: >>> De : IainS >>> >>> I opted to call the static library "libgfortran_static" and to leave >>> the shared name unchanged. >>> >>> It would be great if libtool could be persuaded to change the >>> basename >>> as well as the extension for the dynamic/static >>> but despite RTFM and googling I can't seem to find any example of >>> how >>> to achieve that in an easy manner. > > It doesn't do that because that breaks the abstraction. It might also > increase a bit the risk of ending up with bits of the static library > included, and bits of shared deplibs you use pulling in the shared > version of the library. OK, I appreciate the first part; I don't immediately understand how libfoo-static.a is any more dangerous than libfoo.a or libfoo-s.dylib .... libfoo.so > Can the driver use path/to/libgfortran.a instead of '-Lpath/to > -lgfortran' to avoid being hindered by missing -Bstatic/-Bdynamic? this doesn't appear to work. [I've unset DYLD_LIBRARY_PATH in the following] ./dst-powerpc/usr/bin/gfortran-4.4.0 helloi.F90 /Volumes/UFSScratch/ GCC/gcc-44-build/dst-powerpc/usr/lib/gcc/powerpc-apple-darwin8/4.4.0/ libgfortran.a -o helloif thor:/Volumes/UFSScratch/GCC/gcc-44-build $ ./helloif dyld: Library not loaded: /usr/lib/gcc/powerpc-apple-darwin8/4.4.0/ libgfortran.3.dylib Referenced from: /Volumes/UFSScratch/GCC/gcc-44-build/./helloif Reason: image not found Trace/BPT trap it appears to be ignoring my directly-specified library and linking in the dynamic one anyway. we could campaign for a different linker on OSX/Darwin I guess... ... but it seems that ld64 is the vendor's preferred solution (given the publicly released source for 10.5) > Independently, does anybody know whether odcctools is dead (homepage > seems to be down ATM)? > focus=7173> macports does install this; although it doesn't understand m64 mach-o (at least objdump doesn't) The difficulty becomes that one cannot supply something that is compatible with the vendor's standard installation. We start to require that the end user has administration rights to install into /usr simply in order to run a program? >>> It is possible to accommodate the required lib name change at >>> install >>> time by renaming libgfortran.a and ranlib-ing the new one. > > Don't try this on AIX, where libtool may create a shared archive with > that name. OK. - so the solution as I have it is in the right direction... (bar removing the extra static lib). > I agree with FX that it would be nice to limit a change to Darwin > if at > all. -static-libgcc works on darwin. it's accommodated by different libnames. I don't know if that change extends to other triplets - at present I only have OSX machines to hand. > Cheers, > Ralf thanks for your responses, Iain