This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: New option: -fstatic-libgfortran
- From: Philippe Schaffnit <P dot Schaffnit at access dot rwth-aachen dot de>
- To: François-Xavier Coudert <fxcoudert at gmail dot com>
- Cc: "fortran at gcc dot gnu dot org List" <fortran at gcc dot gnu dot org>, GCC Development <gcc at gcc dot gnu dot org>
- Date: Tue, 24 Apr 2007 08:51:41 +0200
- Subject: Re: New option: -fstatic-libgfortran
- References: <19c433eb0704200115r39a6be52qc12ac8ce45912ebf@mail.gmail.com>
Hi!
Sorry about the (possibly off) question: would this apply also to
GMP/MPFR, if not, wouldn't it make sense?
Philippe
François-Xavier Coudert wrote:
>
> Hi all,
>
> Attached is a first draft of a patch to add a -fstatic-libgfortran
> option. This new option is recognized by the driver and instead of
> adding "-lgfortran" to the various subprocesses, it adds "-Wl,-Bstatic
> -lgfortran -Wl,-Bdynamic". I have two questions about this:
> + linkers other than the GNU linker might have problems with that.
> is there a more general way of doing this? or should it be conditional
> on some macro, like HAVE_LD_STATIC_DYNAMIC?
> + when -static is used later in the command line, this trick doesn't
> work; would "%{!static:-Wl,-Bstatic} -lgfortran
> %{!static:-Wl,-Bdynamic}" be a good replacement?
>
> Thanks for the help, I'm a bit a loss with non-GNU linkers... :(
>
> FX
>
> ------------------------------------------------------------------------
> Name: static-libgfortran.diff
> static-libgfortran.diff Type: text/x-patch
> Encoding: base64