From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5458 invoked by alias); 10 Jun 2008 16:40:53 -0000 Received: (qmail 5442 invoked by uid 22791); 10 Jun 2008 16:40:52 -0000 X-Spam-Check-By: sourceware.org Received: from c2beaomr09.btconnect.com (HELO c2beaomr09.btconnect.com) (213.123.26.187) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 10 Jun 2008 16:40:27 +0000 Received: from [192.168.1.100] (host81-138-1-83.in-addr.btopenworld.com [81.138.1.83]) by c2beaomr09.btconnect.com (MOS 3.8.6-GA) with ESMTP id AHS59540; Tue, 10 Jun 2008 17:40:24 +0100 (BST) In-Reply-To: <6C3D9E30-D1F7-41F6-961F-AFD711C5BBC4@gmail.com> References: <6C3D9E30-D1F7-41F6-961F-AFD711C5BBC4@gmail.com> Mime-Version: 1.0 (Apple Message framework v753.1) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <813A7B40-A6D9-422D-934B-8BDAC4BF2FA8@sandoe-acoustics.co.uk> Cc: Fortran List , GCC Development Content-Transfer-Encoding: 7bit From: IainS Subject: Re: [RFC, Patch, gfortran] make -static-libgfortran work on darwin. Date: Tue, 10 Jun 2008 16:40:00 -0000 To: FX X-Mailer: Apple Mail (2.753.1) X-Junkmail-Status: score=10/50, host=c2beaomr09.btconnect.com X-Junkmail-SD-Raw: score=unknown, refid=str=0001.0A0B0203.484EAE78.015E,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/msg00249.txt.bz2 On 10 Jun 2008, at 17:11, FX wrote: >> I opted to call the static library "libgfortran_static" and to >> leave the shared name unchanged. > > I'd suggest "-static" instead of using an underscore, to follow > libstdc++, but that's a minor point. A minor point maybe, but, as you say, there seem to be several different schemes in use... a source of confusion for me whilst trying to figure out how to do this. I was almost going to rename the shared one _s (as per libgcc) :-) j/k aside is there a convention ? I don't mind (I prefer '-' to '_' personally; '_static' and '_kext' were used in the 4.0.1 vendor release for darwin8). > Otherwise, wrt your patch: doesn't it create three libraries: > libgfortran.dylib, libgfortran.a and libgfortran_static.a? And, > what happens now if you do a -static compilation, does it pick > libgfortran_static automagically? Shouldn't we make that darwin- > specific, in order to not change the situation on the majority of > other systems that don't have a problem with the current situation? Yes, it does make three libs - only a temporary measure to avoid treading on anyone else whilst testing (see below). The "-static-libgfortran" option causes it to pick up the _static version (patch to gfortranspec.c). AFAIK there is no point in doing a "-static" link on darwin [crt0 is not present] (unless you're making a kernel extension). However, the proposed change makes no difference to what will happen if you do. You are right; of course, it should be darwin-specific (and only build the required libs per system) - but I am not familiar enough with the build process to know how best to achieve that... suggestions welcome. Iain