From: FX <fxcoudert@gmail.com>
To: IainS <developer@sandoe-acoustics.co.uk>
Cc: Fortran List <fortran@gcc.gnu.org>, GCC Development <gcc@gcc.gnu.org>
Subject: Re: [RFC, Patch, gfortran] make -static-libgfortran work on darwin.
Date: Tue, 10 Jun 2008 16:12:00 -0000 [thread overview]
Message-ID: <6C3D9E30-D1F7-41F6-961F-AFD711C5BBC4@gmail.com> (raw)
In-Reply-To: <A6664290-AFD1-4FCE-97E5-01DE56BB8B1D@sandoe-acoustics.co.uk>
> The solution is to name the libs differently (as is done elsewhere
> in gcc).
Target libraries named differently? Which? libssp has three variants,
which I don't really understand :)
$ ls libssp*
libssp.0.dylib libssp.dylib libssp_nonshared.a
libssp.a libssp.la libssp_nonshared.la
libgomp has shared and static libraries with the same name:
$ ls libgomp.*
libgomp.1.dylib libgomp.a libgomp.dylib libgomp.la
libgomp.spec
Only libstdc++ has the naming patter you mention, as far as I can tell:
$ ls libstdc++*
libstdc++-static.a libstdc++.6.0.4.dylib libstdc++.6.dylib
> 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.
But more fundamentally, what is the reason that the linker can't be
persuaded to link a static library instead of a shared one? The
reason for that is that for darwin hosts, HAVE_LD_STATIC_DYNAMIC is
not defined. The description for that macro is "Define if your linker
supports -Bstatic/-Bdynamic option.". So, is there a way Darwin way
to achieve the same goal (according to my googling, there isn't, but
I might have missed something).
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?
Thanks,
FX
--
François-Xavier Coudert
http://www.homepages.ucl.ac.uk/~uccafco/
next prev parent reply other threads:[~2008-06-10 16:12 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <A6664290-AFD1-4FCE-97E5-01DE56BB8B1D@sandoe-acoustics.co.uk>
2008-06-10 16:00 ` Fwd: " FX
2008-06-10 19:07 ` Ralf Wildenhues
2008-06-10 19:43 ` IainS
2008-06-10 19:59 ` Ralf Wildenhues
2008-06-10 20:41 ` IainS
2008-06-11 3:40 ` Peter O'Gorman
2008-06-10 20:15 ` Ralf Wildenhues
2008-06-10 16:12 ` FX [this message]
2008-06-10 16:40 ` IainS
2008-06-10 16:43 ` Dave Korn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6C3D9E30-D1F7-41F6-961F-AFD711C5BBC4@gmail.com \
--to=fxcoudert@gmail.com \
--cc=developer@sandoe-acoustics.co.uk \
--cc=fortran@gcc.gnu.org \
--cc=gcc@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).