On Fri, Apr 20, 2007 at 10:15:34AM +0200, 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... :(

Perhaps looking at how stuff is done for libgcc.a in
gcc/{Makefile.in,gccspec.c} would help?

Reply via email to