From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 536 invoked by alias); 10 Jun 2008 20:41:37 -0000 Received: (qmail 523 invoked by uid 22791); 10 Jun 2008 20:41:36 -0000 X-Spam-Check-By: sourceware.org Received: from c2bthomr04.btconnect.com (HELO c2bthomr04.btconnect.com) (213.123.20.122) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 10 Jun 2008 20:41:17 +0000 Received: from [192.168.1.100] (host81-138-1-83.in-addr.btopenworld.com [81.138.1.83]) by c2bthomr04.btconnect.com with ESMTP id IYS72056; Tue, 10 Jun 2008 21:41:13 +0100 (BST) In-Reply-To: <20080610195850.GH1722@ins.uni-bonn.de> References: <3D6964FD-6DF0-4F83-9932-6945316CFBF5@gmail.com> <20080610190632.GF1722@ins.uni-bonn.de> <98926BA1-55FA-4204-BC7E-79E992097812@sandoe-acoustics.co.uk> <20080610195850.GH1722@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: <6EDD138A-8D45-47D5-A020-55DC67B1084A@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 20:41:00 -0000 To: Ralf Wildenhues X-Mailer: Apple Mail (2.753.1) X-Junkmail-Status: score=10/50, host=c2bthomr04.btconnect.com X-Junkmail-SD-Raw: score=unknown, refid=str=0001.0A01020A.484EE6EA.00DF,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/msg00263.txt.bz2 On 10 Jun 2008, at 20:58, Ralf Wildenhues wrote: > * IainS wrote on Tue, Jun 10, 2008 at 09:42:29PM CEST: >> On 10 Jun 2008, at 20:06, Ralf Wildenhues wrote: >> >>> 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 > > Well, what I meant was that on Dargin, gfortran could pass the > argument > path/to/libgfortran.a > > to collect2, instead of passing > -Bstatic -lgfortran -Bdynamic I guess.. [I'll have to try this another day ] you can do "-nodefaultlibs" and then specify all the libs by hand. That works (I originally did this). It seems then that the driver has to replicate the multilibs stuff... I'm not sure that it would produce less darwin-specific code than renaming the lib. >> we could campaign for a different linker on OSX/Darwin I guess... > > What's the problem with just using the shared library? > (Yeah, I knew that question was naive ... but hey, it works ;-) I'm also happy to file a radar for missing Bstatic/Bdynamic. >> We start to require that the end user has administration rights to >> install into /usr simply in order to run a program? > > I'm not sure whether I understand this comment. Isn't the link-time > location of a shared library added to the search path anyway? > (My experience with darwin is quite limited, so my memory may serve > me wrong here.) fortran is not part of any standard installation on OSX (yet..., of course, that could change). On darwin 8 the gcc version is 4.0.1 I don't know whether the 4.2.1 version [from darwin 9] will be officially released ... I've back-ported it (but, that's not an end-user thing) if you want to deliver any different you have to choose (a) the end user must install with admin rights [to put stuff in / usr etc.] (b) static linking of the missing bits (b) is a lot simpler for me... ttfn, Iain