This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: New option: -fstatic-libgfortran


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?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]