This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC, Patch, gfortran] make -static-libgfortran work on darwin.
- From: IainS <developer at sandoe-acoustics dot co dot uk>
- To: FX <fxcoudert at gmail dot com>
- Cc: Fortran List <fortran at gcc dot gnu dot org>, GCC Development <gcc at gcc dot gnu dot org>
- Date: Tue, 10 Jun 2008 17:40:23 +0100
- Subject: Re: [RFC, Patch, gfortran] make -static-libgfortran work on darwin.
- References: <A6664290-AFD1-4FCE-97E5-01DE56BB8B1D@sandoe-acoustics.co.uk> <6C3D9E30-D1F7-41F6-961F-AFD711C5BBC4@gmail.com>
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